Commit 5007c61e authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

cmake: Include iconv when testing ICONV_CONST if needed.

parent f83cca6e
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment