Add missing libs. Not sure if this is the right way to do it though
authorRémi Denis-Courmont <rem@videolan.org>
Mon, 4 Feb 2008 21:19:42 +0000 (21:19 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Mon, 4 Feb 2008 21:19:42 +0000 (21:19 +0000)
extras/buildsystem/cmake/CMakeLists/src_CMakeLists.txt
extras/buildsystem/cmake/include/config.cmake

index a53aa4a..49c473e 100644 (file)
@@ -134,7 +134,8 @@ endif(SYS_DARWIN)
 
 add_library(libvlc SHARED ${SOURCES_libvlc})
 install_targets(/lib libvlc)
-set_target_properties(libvlc PROPERTIES LINK_FLAGS "${LIBICONV}")
+set_target_properties(libvlc PROPERTIES LINK_FLAGS
+       "-z defs --as-needed -lm ${LIBRT} ${LIBICONV} ${CMAKE_THREAD_LIBS_INIT}")
 set_target_properties(libvlc PROPERTIES SOVERSION 1.0.0)
 
 # libvlc-control
@@ -241,5 +242,6 @@ set(about)
 # SET_TARGET_PROPERTIES
 
 set_target_properties(libvlc libvlc-control PROPERTIES PREFIX "")
+set_target_properties(libvlc-control PROPERTIES LINK_FLAGS "-z defs --as-needed")
 set_target_properties(libvlc libvlc-control vlc PROPERTIES COMPILE_FLAGS
     "-Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes" )
index 38e3de5..b08b660 100644 (file)
@@ -80,13 +80,16 @@ set(LIBICONV "")
 vlc_check_functions_exist(iconv)
 
 if(NOT HAVE_ICONV)
-    set(LIBICONV "iconv")
+    set(LIBICONV "-liconv")
     check_library_exists(iconv iconv "" HAVE_ICONV)
 endif(NOT HAVE_ICONV)
 # FIXME: this will break on *BSD:
 set( ICONV_CONST "" )
 
 check_library_exists(rt clock_nanosleep "" HAVE_CLOCK_NANOSLEEP)
+if (HAVE_CLOCK_NANOSLEEP)
+    set(LIBRT "-lrt")
+endif (HAVE_CLOCK_NANOSLEEP)
 
 ###########################################################
 # Other check