diff options
author | François Andriot <francois.andriot@free.fr> | 2014-10-05 14:44:34 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2014-10-05 14:45:13 +0200 |
commit | af2c2afb25ce2b62767cdc639cf6d0c4fb967eaa (patch) | |
tree | 39ac29925ab8237f14f3597b0079c94ed25de922 | |
parent | 67d3c303f3ba902ebc8337d683cc184340d5db32 (diff) | |
download | tdelibs-af2c2afb25ce2b62767cdc639cf6d0c4fb967eaa.tar.gz tdelibs-af2c2afb25ce2b62767cdc639cf6d0c4fb967eaa.zip |
Fix hardcoded link flag to "dl" library
Fix "dlopen" function detection
-rw-r--r-- | CMakeLists.txt | 13 | ||||
-rw-r--r-- | tdestyles/kthemestyle/CMakeLists.txt | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ee04b5c6..5433fe121 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -475,10 +475,15 @@ set( kde_socklen_t socklen_t ) ##### check for libdl ########################### -find_library( HAVE_LIBDL dl ) -if( NOT HAVE_LIBDL-NOTFOUND ) - set( DL_LIBRARIES dl ) -endif( NOT HAVE_LIBDL-NOTFOUND ) +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 ) ##### check for utempter ######################## diff --git a/tdestyles/kthemestyle/CMakeLists.txt b/tdestyles/kthemestyle/CMakeLists.txt index 4c2f06d23..8a1bd2a8c 100644 --- a/tdestyles/kthemestyle/CMakeLists.txt +++ b/tdestyles/kthemestyle/CMakeLists.txt @@ -36,6 +36,6 @@ set( ${target}_SRCS tde_add_kpart( ${target} AUTOMOC SOURCES ${${target}_SRCS} - LINK tdefx-shared tdecore-shared dl + LINK tdefx-shared tdecore-shared ${DL_LIBRARIES} DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/styles ) |