From 2daa670ce8e56a82f61c8cbee47566c2cd139d1e Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Tue, 13 Oct 2020 15:20:03 +0300 Subject: [PATCH] cmake: look for iconv in libc, too (bug #5316.) --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a02eb66b..78e409990 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()