]> git.sesse.net Git - vlc/commitdiff
cmake: Include iconv when testing ICONV_CONST if needed.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Thu, 7 Feb 2008 17:23:41 +0000 (17:23 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Thu, 7 Feb 2008 17:23:41 +0000 (17:23 +0000)
extras/buildsystem/cmake/include/config.cmake

index ea91d3c9a861cb5d3cb22f55311f1850f46e9202..50092983c3751ff4105797ae6c18250adca474a5 100644 (file)
@@ -109,6 +109,7 @@ if(NOT HAVE_ICONV)
     set(LIBICONV "iconv")
     check_library_exists(iconv iconv "" HAVE_ICONV)
 endif(NOT HAVE_ICONV)
+set(CMAKE_REQUIRED_LIBRARIES ${LIBICONV})
 CHECK_C_SOURCE_COMPILES(" #include <iconv.h>
  int main() { return iconv(0, (char **)0, 0, (char**)0, 0); }" ICONV_NO_CONST)
 if( ICONV_NO_CONST )
@@ -116,6 +117,7 @@ if( ICONV_NO_CONST )
 else( ICONV_NO_CONST )
   set( ICONV_CONST " ")
 endif( ICONV_NO_CONST )
+set(CMAKE_REQUIRED_LIBRARIES)
 
 check_library_exists(rt clock_nanosleep "" HAVE_CLOCK_NANOSLEEP)
 if (HAVE_CLOCK_NANOSLEEP)