]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Why is this all so ugly? Bugfix: Only add a target library if there is
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 26 Sep 2012 21:29:45 +0000 (21:29 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 26 Sep 2012 21:29:45 +0000 (21:29 +0000)
one...

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26765 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/macros/macro_deal_ii_setup_target.cmake

index c917f38e672a0fe33b03020a0a3eb50565f1e692..022df90310695ed287fedf28607111038d752b11 100644 (file)
@@ -30,16 +30,28 @@ MACRO(DEAL_II_SETUP_TARGET target)
       "${DEAL_II_USER_DEFINITIONS_RELEASE}"
     )
 
-  TARGET_LINK_LIBRARIES(${target}
-    debug
-      ${DEAL_II_LIBRARIES_DEBUG}
-      ${DEAL_II_EXTERNAL_LIBRARIES_DEBUG}
-    optimized
-      ${DEAL_II_LIBRARIES_RELEASE}
-      ${DEAL_II_EXTERNAL_LIBRARIES_RELEASE}
-    general
-      ${DEAL_II_EXTERNAL_LIBRARIES}
-    )
+  IF(NOT "${DEAL_II_LIBRARIES_DEBUG}${DEAL_II_EXTERNAL_LIBRARIES_DEBUG}" STREQUAL "")
+    TARGET_LINK_LIBRARIES(${target}
+      debug
+        ${DEAL_II_LIBRARIES_DEBUG}
+        ${DEAL_II_EXTERNAL_LIBRARIES_DEBUG}
+      )
+  ENDIF()
+
+  IF(NOT "${DEAL_II_LIBRARIES_RELEASE}${DEAL_II_EXTERNAL_LIBRARIES_RELEASE}" STREQUAL "")
+    TARGET_LINK_LIBRARIES(${target}
+      optimized
+        ${DEAL_II_LIBRARIES_RELEASE}
+        ${DEAL_II_EXTERNAL_LIBRARIES_RELEASE}
+      )
+  ENDIF()
+
+  IF(NOT "${DEAL_II_EXTERNAL_LIBRARIES}" STREQUAL "")
+    TARGET_LINK_LIBRARIES(${target}
+      general
+        ${DEAL_II_EXTERNAL_LIBRARIES}
+      )
+  ENDIF()
 
 ENDMACRO()
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.