From 428e681784b57de38bdb94924e642e071799c703 Mon Sep 17 00:00:00 2001 From: Martijn van Beurden Date: Wed, 20 Jul 2022 14:52:18 +0200 Subject: [CMake] Don't search for libiconv and libintl on Windows The functions these libs provide don't seem to be used on Windows anyway. This fixes https://github.com/xiph/flac/issues/249 --- CMakeLists.txt | 6 ++++-- src/share/getopt/CMakeLists.txt | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 761dd49b..2aa7daea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,8 +77,10 @@ if(HAVE_GIT) ) endif() -find_package(Iconv) -set(HAVE_ICONV ${Iconv_FOUND}) +if(NOT WIN32) + find_package(Iconv) + set(HAVE_ICONV ${Iconv_FOUND}) +endif() if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Winline") diff --git a/src/share/getopt/CMakeLists.txt b/src/share/getopt/CMakeLists.txt index 83b530e5..d905615e 100644 --- a/src/share/getopt/CMakeLists.txt +++ b/src/share/getopt/CMakeLists.txt @@ -1,6 +1,8 @@ check_include_file("string.h" HAVE_STRING_H) -find_package(Intl) +if(NOT WIN32) + find_package(Intl) +endif() add_library(getopt STATIC getopt.c getopt1.c) -- cgit v1.2.1