From e06a1446e74b34ff62093af348b70b4f1cdd5db5 Mon Sep 17 00:00:00 2001 From: maier Date: Thu, 18 Apr 2013 16:04:10 +0000 Subject: [PATCH] CMake: Generation of Make.global_options: Append a "-l" to a library that is not specified with full path if necessary git-svn-id: https://svn.dealii.org/trunk@29332 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/config/CMakeLists.txt | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/deal.II/cmake/config/CMakeLists.txt b/deal.II/cmake/config/CMakeLists.txt index 02780e6ed2..212fc29f0a 100644 --- a/deal.II/cmake/config/CMakeLists.txt +++ b/deal.II/cmake/config/CMakeLists.txt @@ -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() -- 2.39.5