]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Revert "Revert 29343 again, for the same reason as before." which itself reverted...
authorMatthias Maier <tamiko@kyomu.43-1.org>
Mon, 11 Nov 2013 09:06:30 +0000 (09:06 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Mon, 11 Nov 2013 09:06:30 +0000 (09:06 +0000)
git-svn-id: https://svn.dealii.org/trunk@31616 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/config/CMakeLists.txt

index ed805981f84f85d4d168ddc4fdfa41f813e294bb..d6b3bb2a8920fc1ee6d02327521deb0b3a78309d 100644 (file)
@@ -218,6 +218,7 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
   #
 
   FOREACH(build ${DEAL_II_BUILD_TYPES})
+
     TO_STRING_AND_ADD_PREFIX(MAKEFILE_DEFINITIONS_${build}
       "-D"
       ${DEAL_II_USER_DEFINITIONS}
@@ -227,14 +228,16 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
     #
     # Ideally, DEAL_II_EXTERNAL_LIBRARIES should just contain a list of
     # full library paths. Nevertheless, filter out all elements that are
-    # not a full path starting with "/".
+    # not a full path starting with "/" or that happen to be a "framework"
+    # - we won't deal with that in Make.global_options.
     #
+
     SET(_libs)
     FOREACH(_lib
         ${DEAL_II_EXTERNAL_LIBRARIES_${build}}
         ${DEAL_II_EXTERNAL_LIBRARIES}
         )
-      IF(_lib MATCHES "^/")
+      IF(_lib MATCHES "^\\s*\\/" AND NOT _lib MATCHES "\\.framework$")
         LIST(APPEND _libs "${_lib}")
       ENDIF()
     ENDFOREACH()
@@ -250,14 +253,51 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
         ${DEAL_II_EXTERNAL_LIBRARIES_${build}}
         ${DEAL_II_EXTERNAL_LIBRARIES}
         )
-      LIST(APPEND MAKEFILE_LIBS_${build} ${_lib})
+
       #
-      # Extract library paths where possible:
+      # Strip leading and trailing whitespace
       #
-      IF(_lib MATCHES "^(/|\\$\\(D\\))")
+      STRING(STRIP "${_lib}" _lib)
+
+      IF(_lib MATCHES "^\\/.*\\.framework$")
+        #
+        # We have a MacOSX framework
+        #
+        # TODO: What do?
+        #
+
+      ELSEIF(_lib MATCHES "^(\\/|\\$\\(D\\))")
+        #
+        # Full path: /path/to/libfoo.(so|dylib|etc):
+        #
+
+        # Extract library paths:
         GET_FILENAME_COMPONENT(_path ${_lib} PATH)
         LIST(APPEND _paths ${_path})
+
+        LIST(APPEND MAKEFILE_LIBS_${build} ${_lib})
+
+      ELSEIF(_lib MATCHES "^-l")
+        #
+        # Library is of the form "-lfoo":
+        #
+        LIST(APPEND MAKEFILE_LIBS_${build} ${_lib})
+
+      ELSEIF(NOT _lib MATCHES "^\\s*$" AND NOT _lib MATCHES "\\.so(\\.[0-9]+)*$")
+        #
+        # Well in this case we just assume that we have to append a "-l"
+        #
+
+        LIST(APPEND MAKEFILE_LIBS_${build} "-l${_lib}")
+
+      ELSE()
+        #
+        # For now, ignore the rest.
+        #
+        # TODO: What do?
+        #
       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.