[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
This commit is contained in:
Martijn van Beurden 2022-07-20 14:52:18 +02:00
parent 4e823662ec
commit 428e681784
2 changed files with 7 additions and 3 deletions

View File

@ -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")

View File

@ -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)