From bfbcf19a2fbfa301b8796f19b71fdee3e8c4fce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 12 Oct 2014 18:24:29 +0200 Subject: Fix hardcoded link flag to "dl" library Fix "dlopen" function detection --- ConfigureChecks.cmake | 14 ++++++++++++++ kdesktop/CMakeLists.txt | 2 +- konsole/konsole/CMakeLists.txt | 2 +- nsplugins/viewer/CMakeLists.txt | 2 +- 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} ) -- cgit v1.2.1