From d757ed5441ac9773c846bb7878e4d5f329fe9469 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 11 Jul 2013 22:44:44 +0000 Subject: [PATCH] CMake: Bugfix: Link static report_features correctly git-svn-id: https://svn.dealii.org/trunk@29982 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/scripts/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/deal.II/cmake/scripts/CMakeLists.txt b/deal.II/cmake/scripts/CMakeLists.txt index 41c50b9855..8103212819 100644 --- a/deal.II/cmake/scripts/CMakeLists.txt +++ b/deal.II/cmake/scripts/CMakeLists.txt @@ -49,12 +49,21 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES) ADD_EXECUTABLE(report_features ${CMAKE_CURRENT_BINARY_DIR}/report_features.cc ) + + # + # Link report_features in the same way as the library/final executable: + # TARGET_LINK_LIBRARIES(report_features ${DEAL_II_EXTERNAL_LIBRARIES}) SET_TARGET_PROPERTIES(report_features PROPERTIES LINK_FLAGS "${DEAL_II_LINKER_FLAGS}" COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS}" ) + IF(DEAL_II_STATIC_EXECUTABLE) + SET_PROPERTY(TARGET report_features PROPERTY + LINK_SEARCH_END_STATIC TRUE + ) + ENDIF() IF(NOT CMAKE_CROSSCOMPILING) ADD_CUSTOM_TARGET(run_report_features COMMAND report_features) -- 2.39.5