cmake: look for iconv in libc, too (bug #5316.)

This commit is contained in:
Ozkan Sezer 2020-10-13 15:20:03 +03:00
parent 6756851836
commit 2daa670ce8

View file

@ -841,7 +841,10 @@ if(LIBC)
endif()
check_library_exists(iconv iconv_open "" HAVE_LIBICONV)
if(HAVE_LIBICONV)
check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)
if(HAVE_BUILTIN_ICONV)
set(HAVE_ICONV 1)
elseif(HAVE_LIBICONV)
list(APPEND EXTRA_LIBS iconv)
set(HAVE_ICONV 1)
endif()