kdesupport/strigi/libstreamanalyzer

Raphael Kubo da Costa kubito at gmail.com
Sun Mar 21 21:05:01 CET 2010


SVN commit 1106077 by rkcosta:

Recommit r642971, yet another build fix lost in the project reorganization.

Fixes build on FreeBSD, where libdl is in libc, not libdl.

CCMAIL: jos at vandenoever.info
CCMAIL: kde-buildsystem at kde.org


 M  +25 -0     CMakeLists.txt  
 M  +1 -1      lib/CMakeLists.txt  


--- trunk/kdesupport/strigi/libstreamanalyzer/CMakeLists.txt #1106076:1106077
@@ -42,7 +42,32 @@
 	add_definitions(-fPIC)
 endif(NOT MSVC AND NOT CMAKE_SYSTEM MATCHES "SunOS-5*.")
 
+#
+# AC_CHECK_LIB(dl, dlopen, DL_LIBRARY="-ldl", DL_LIBRARY="") for cmake by
+# alexander neundorf
+#
+# on FreeBSD dlopen is in libc, on GNU/Linux it's in libdl
+if(NOT WIN32)
+  include(CheckFunctionExists)
+  check_library_exists(dl dlopen ""  DLOPEN_IN_LIBDL)
+  check_function_exists(dlopen DLOPEN_IN_LIBC)
+  set(LIBDL)
 
+  if (DLOPEN_IN_LIBC)
+   set(HAVE_LIBDL TRUE)
+  endif (DLOPEN_IN_LIBC)
+
+  if (DLOPEN_IN_LIBDL)
+   set(LIBDL dl)
+   set(HAVE_LIBDL TRUE)
+  endif (DLOPEN_IN_LIBDL)
+
+  if (NOT HAVE_LIBDL)
+   message(FATAL_ERROR "dlopen support is required.")
+  endif (NOT HAVE_LIBDL)
+endif(NOT WIN32)
+
+
 ##### environment inspection #####
 
 # check for visibility support
--- trunk/kdesupport/strigi/libstreamanalyzer/lib/CMakeLists.txt #1106076:1106077
@@ -62,7 +62,7 @@
         set(streamanalyzer_libs ${streamanalyzer_libs} ${LIBDL} )
 endif(HAVE_LIBDL)
 target_link_libraries(streamanalyzerstatic ${streamanalyzer_libs}
-	${CMAKE_THREAD_LIBS_INIT} dl)
+	${CMAKE_THREAD_LIBS_INIT})
 
 add_library(streamanalyzer SHARED ${streamanalyzer_SRCS})
 set_target_properties(streamanalyzer PROPERTIES


More information about the Kde-buildsystem mailing list