summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorFrançois Andriot <francois.andriot@free.fr>2016-04-13 23:12:16 +0200
committerSlávek Banko <slavek.banko@axis.cz>2016-04-14 00:20:49 +0200
commit09255fac060b4bf3426b2e45277d7d798c162767 (patch)
tree96a55e3c8d198d513b358c1e0c8881b678d124b4 /CMakeLists.txt
parenta08f1e9503238bdbca735e6625c3192c52705ce4 (diff)
downloadlibr-09255fac060b4bf3426b2e45277d7d798c162767.tar.gz
libr-09255fac060b4bf3426b2e45277d7d798c162767.zip
Fix FTBFS due to missing link dl library
Signed-off-by: François Andriot <francois.andriot@free.fr>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec3eb11..c14b516 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,6 +23,8 @@ set( VERSION 0.6.0 )
include( FindPkgConfig )
include( CheckIncludeFile )
+include( CheckFunctionExists )
+include( CheckLibraryExists )
##### include our cmake modules #################
@@ -83,6 +85,15 @@ if( NOT LIBGLADE_FOUND )
tde_message_fatal( "libglade-2.0 are required, but not found on your system" )
endif( NOT LIBGLADE_FOUND )
+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 )
set( EXTRA_LIBRARIES "-lm -lpthread" )
if( UNIX )