summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2015-02-24 14:50:37 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2015-02-24 14:50:37 +0000
commitd2663161e28ccf780398312c04241cf528f3d14b (patch)
tree482813ea00f630998ff3ae899be4f60fe974efff /src
parenta88c1f2974a54cb8c323db9f5650e5d4a939cb31 (diff)
[CMake] Improve handling of ldl and X11 libraries (STR #3196).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10590 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d53ab8001..cb06a02c2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -213,8 +213,12 @@ endif(APPLE)
#######################################################################
FL_ADD_LIBRARY(fltk STATIC "${CPPFILES};${MMFILES};${CFILES};fl_call_main.c")
+if(LIB_dl)
+ target_link_libraries(fltk ${LIB_dl})
+endif(LIB_dl)
+
if(USE_THREADS)
- target_link_libraries(fltk ${CMAKE_THREAD_LIBS_INIT} ${LIB_dl})
+ target_link_libraries(fltk ${CMAKE_THREAD_LIBS_INIT})
endif(USE_THREADS)
if(USE_X11)
@@ -288,8 +292,12 @@ if(OPTION_BUILD_SHARED_LIBS)
#######################################################################
FL_ADD_LIBRARY(fltk SHARED "${CPPFILES};${MMFILES};${CFILES}")
+if(LIB_dl)
+ target_link_libraries(fltk_SHARED ${LIB_dl})
+endif(LIB_dl)
+
if(USE_THREADS)
- target_link_libraries(fltk_SHARED ${CMAKE_THREAD_LIBS_INIT} ${LIB_dl})
+ target_link_libraries(fltk_SHARED ${CMAKE_THREAD_LIBS_INIT})
endif(USE_THREADS)
if(USE_X11)