Don't link against yes. Of course it does not work anyway
authorRémi Denis-Courmont <rem@videolan.org>
Mon, 4 Feb 2008 20:59:37 +0000 (20:59 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Mon, 4 Feb 2008 20:59:37 +0000 (20:59 +0000)
extras/buildsystem/cmake/CMakeLists/src_CMakeLists.txt
extras/buildsystem/cmake/include/config.cmake

index 44f12cd..708d791 100644 (file)
@@ -172,7 +172,7 @@ target_link_libraries(libvlc-control libvlc)
 # Libraries
 
 # iconv
-target_link_libraries(libvlc ${HAVE_ICONV})
+target_link_libraries(libvlc ${LIBICONV})
 
 # Carbon
 if(APPLE)
index 31b785a..9cb3eab 100644 (file)
@@ -75,9 +75,15 @@ if(NOT HAVE_GETADDRINFO)
     check_library_exists(getaddrinfo nsl "" HAVE_GETADDRINFO)
 endif(NOT HAVE_GETADDRINFO)
 
-find_library(HAVE_ICONV iconv)
+set(LIBICONV "")
+vlc_check_functions_exist(iconv)
+
+if(NOT HAVE_ICONV)
+    set(LIBICONV "iconv")
+    check_library_exists(iconv iconv "" HAVE_ICONV)
+endif(NOT HAVE_ICONV)
 # FIXME: this will break on *BSD:
-set( ICONV_CONST " " )
+set( ICONV_CONST "" )
 
 check_library_exists(rt clock_nanosleep "" HAVE_CLOCK_NANOSLEEP)