]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Generation of Make.global_options: Append a "-l" to a library that is not...
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 18 Apr 2013 16:04:10 +0000 (16:04 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 18 Apr 2013 16:04:10 +0000 (16:04 +0000)
git-svn-id: https://svn.dealii.org/trunk@29332 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/config/CMakeLists.txt

index 02780e6ed275df03ad692c4c7e14bad16a2d8559..212fc29f0a5a9c47adc33e469de3ea38d2ead29d 100644 (file)
@@ -189,13 +189,23 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
         ${DEAL_II_EXTERNAL_LIBRARIES}
         ${DEAL_II_EXTERNAL_LIBRARIES_${build}}
         )
-      LIST(APPEND MAKEFILE_LIBS_${build} ${_lib})
-      #
-      # Extract library paths where possible:
-      #
       IF(_lib MATCHES "^(/|\\$\\(D\\))")
+
+        # Extract library paths where possible:
         GET_FILENAME_COMPONENT(_path ${_lib} PATH)
         LIST(APPEND _paths ${_path})
+
+        # Append the library with full path to the link line:
+        LIST(APPEND MAKEFILE_LIBS_${build} ${_lib})
+      ELSE()
+
+        # Not a full path, append a "-l" if not already present:
+        IF(_lib MATCHES "^-l")
+          LIST(APPEND MAKEFILE_LIBS_${build} ${_lib})
+        ELSE()
+          LIST(APPEND MAKEFILE_LIBS_${build} "-l${_lib}")
+        ENDIF()
+
       ENDIF()
     ENDFOREACH()
 

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.