Explorar el Código

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

Ozkan Sezer hace 5 años
padre
commit
2daa670ce8
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      CMakeLists.txt

+ 4 - 1
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()