summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrançois Andriot <francois.andriot@free.fr>2014-10-12 18:24:29 +0200
committerSlávek Banko <slavek.banko@axis.cz>2014-10-12 18:50:07 +0200
commitbfbcf19a2fbfa301b8796f19b71fdee3e8c4fce6 (patch)
tree2e35f9ade51f07e6ef009bf7b3fdfcce106e99de
parent56c4daef68fee06d34ac5021b64a0d8bd454b106 (diff)
downloadtdebase-bfbcf19a2fbfa301b8796f19b71fdee3e8c4fce6.tar.gz
tdebase-bfbcf19a2fbfa301b8796f19b71fdee3e8c4fce6.zip
Fix hardcoded link flag to "dl" library
Fix "dlopen" function detection
-rw-r--r--ConfigureChecks.cmake14
-rw-r--r--kdesktop/CMakeLists.txt2
-rw-r--r--konsole/konsole/CMakeLists.txt2
-rw-r--r--nsplugins/viewer/CMakeLists.txt2
4 files changed, 17 insertions, 3 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 6e35ca7db..21ec42001 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -14,6 +14,20 @@
tde_setup_architecture_flags( )
+
+##### check for libdl ###########################
+
+set( DL_LIBRARIES dl )
+check_library_exists( ${DL_LIBRARIES} dlopen /lib HAVE_LIBDL )
+if( NOT HAVE_LIBDL )
+ unset( DL_LIBRARIES )
+ check_function_exists( dlopen HAVE_DLOPEN )
+ if( HAVE_DLOPEN )
+ set( HAVE_LIBDL 1 )
+ endif( HAVE_DLOPEN )
+endif( NOT HAVE_LIBDL )
+
+
# termios.h (tdm, tdeioslave)
if( BUILD_TDM OR BUILD_TDEIOSLAVES )
check_include_file( termios.h HAVE_TERMIOS_H )
diff --git a/kdesktop/CMakeLists.txt b/kdesktop/CMakeLists.txt
index 80ea9c21a..743a3453e 100644
--- a/kdesktop/CMakeLists.txt
+++ b/kdesktop/CMakeLists.txt
@@ -97,7 +97,7 @@ tde_add_tdeinit_executable( ${target} AUTOMOC
LINK
kdesktopsettings-static bgnd-static dmctl-static
konq-shared tdeutils-shared
- ${XRENDER_LIBRARIES} ${XCURSOR_LIBRARIES} Xext dl
+ ${XRENDER_LIBRARIES} ${XCURSOR_LIBRARIES} Xext ${DL_LIBRARIES}
${XSS_LIBRARIES} ${DBUS_1_TQT_LIBRARIES}
)
diff --git a/konsole/konsole/CMakeLists.txt b/konsole/konsole/CMakeLists.txt
index 9473db291..68566de4c 100644
--- a/konsole/konsole/CMakeLists.txt
+++ b/konsole/konsole/CMakeLists.txt
@@ -74,5 +74,5 @@ set( ${target}_SRCS
tde_add_tdeinit_executable( ${target} AUTOMOC
SOURCES ${${target}_SRCS}
- LINK tdeprint-shared tdeio-shared ${XRENDER_LIBRARIES} dl
+ LINK tdeprint-shared tdeio-shared ${XRENDER_LIBRARIES} ${DL_LIBRARIES}
)
diff --git a/nsplugins/viewer/CMakeLists.txt b/nsplugins/viewer/CMakeLists.txt
index 89e0ef32b..e3149cadb 100644
--- a/nsplugins/viewer/CMakeLists.txt
+++ b/nsplugins/viewer/CMakeLists.txt
@@ -30,6 +30,6 @@ tde_add_executable( nspluginviewer AUTOMOC
../NSPluginCallbackIface.stub NSPluginClassIface.skel
nsplugin.cpp viewer.cpp qxteventloop.cpp
glibevents.cpp
- LINK tdeparts-shared tdeio-shared ${GLIB2_LIBRARIES} Xt dl
+ LINK tdeparts-shared tdeio-shared ${GLIB2_LIBRARIES} Xt ${DL_LIBRARIES}
DESTINATION ${BIN_INSTALL_DIR}
)