From 2e01e7ce8a3728aced13f06e262729519d8cad76 Mon Sep 17 00:00:00 2001 From: erw7 Date: Thu, 8 Aug 2019 19:06:02 +0900 Subject: [PATCH] build/MSVC: Fix HAVE_ICONV_H #10697 Problem: HAVE_ICONV_H is not true in MSVC Solution: Since iconv.h does not exist in the standard include directory in MSVC, CMAKE_REQUIRED_INCLUDES must be set. Note: This will be unnecessary after #10708. --- config/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt index 82cb4d31ad..d80686ff2e 100644 --- a/config/CMakeLists.txt +++ b/config/CMakeLists.txt @@ -20,7 +20,13 @@ endif() check_symbol_exists(_NSGetEnviron crt_externs.h HAVE__NSGETENVIRON) # Headers +if(ICONV_INCLUDE_DIR) + list(APPEND CMAKE_REQUIRED_INCLUDES "${ICONV_INCLUDE_DIR}") +endif() check_include_files(iconv.h HAVE_ICONV_H) +if(ICONV_INCLUDE_DIR) + list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES "${ICONV_INCLUDE_DIR}") +endif() check_include_files(langinfo.h HAVE_LANGINFO_H) check_include_files(locale.h HAVE_LOCALE_H) check_include_files(pwd.h HAVE_PWD_H)