From b22270325f6be6395a5c735754f676bacc8f3e76 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Mon, 4 Feb 2008 20:59:37 +0000 Subject: [PATCH] Don't link against yes. Of course it does not work anyway --- extras/buildsystem/cmake/CMakeLists/src_CMakeLists.txt | 2 +- extras/buildsystem/cmake/include/config.cmake | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/extras/buildsystem/cmake/CMakeLists/src_CMakeLists.txt b/extras/buildsystem/cmake/CMakeLists/src_CMakeLists.txt index 44f12cdeb8..708d791a47 100644 --- a/extras/buildsystem/cmake/CMakeLists/src_CMakeLists.txt +++ b/extras/buildsystem/cmake/CMakeLists/src_CMakeLists.txt @@ -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) diff --git a/extras/buildsystem/cmake/include/config.cmake b/extras/buildsystem/cmake/include/config.cmake index 31b785a31d..9cb3eab60b 100644 --- a/extras/buildsystem/cmake/include/config.cmake +++ b/extras/buildsystem/cmake/include/config.cmake @@ -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) -- 2.39.2