summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2006-04-17 18:13:39 (GMT)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2006-04-17 18:13:39 (GMT)
commit688e630f6b8f583f9adccb00906eb6e7913cf4f2 (patch)
tree4854d1ec4cd9639feb6b63259b5ed068643705da
parent5ecfd3d4d332e616605a75a273921b01437cb08f (diff)
downloadCMake-688e630f6b8f583f9adccb00906eb6e7913cf4f2.zip
CMake-688e630f6b8f583f9adccb00906eb6e7913cf4f2.tar.gz
CMake-688e630f6b8f583f9adccb00906eb6e7913cf4f2.tar.bz2
COMP: Fix compilation on linux (dlopen/dlclose symbols)
-rw-r--r--Source/kwsys/CMakeLists.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index 1ed4e75..1cd4b4a 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -515,6 +515,11 @@ ENDFOREACH(h)
IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
ADD_LIBRARY(${KWSYS_NAMESPACE} ${KWSYS_LIBRARY_TYPE}
${KWSYS_C_SRCS} ${KWSYS_CXX_SRCS})
+ IF(KWSYS_USE_DynamicLoader)
+ IF(UNIX)
+ TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE} ${CMAKE_DL_LIBS})
+ ENDIF(UNIX)
+ ENDIF(KWSYS_USE_DynamicLoader)
# Apply user-defined target properties to the library.
IF(KWSYS_PROPERTIES_CXX)
@@ -611,9 +616,6 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
)
# If kwsys contains the DynamicLoader, need extra library
ADD_LIBRARY(testDynload MODULE testDynload.c)
- IF(UNIX)
- TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE} ${CMAKE_DL_LIBS})
- ENDIF(UNIX)
ENDIF(KWSYS_USE_DynamicLoader)
FOREACH(test
testSystemTools