From c9f6369c7621ac9875257c462278ab8174c6f662 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sun, 25 Aug 2024 01:38:04 +0200 Subject: FindIconv: Fix finding iconv.h on Alpine Linux Alpine Linux has the `iconv.h` belonging to the builtin `iconv` library provided by musl C library in the standard directory (`/usr/include`). However, when installing the GNU libiconv APK package (`gnu-libiconv`), the GNU `libiconv` library has header located in `/usr/include/gnu-libiconv` subdirectory. Fix finding the header matching the `libiconv` library. Issue: #24695 --- Modules/FindIconv.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/FindIconv.cmake b/Modules/FindIconv.cmake index 879ff16f..876af8d 100644 --- a/Modules/FindIconv.cmake +++ b/Modules/FindIconv.cmake @@ -134,6 +134,8 @@ else() find_path(Iconv_INCLUDE_DIR NAMES "iconv.h" + PATH_SUFFIXES + gnu-libiconv # GNU libiconv on Alpine Linux has header in a subdirectory. DOC "iconv include directory") set(Iconv_LIBRARY_NAMES "iconv" "libiconv") mark_as_advanced(Iconv_INCLUDE_DIR) -- cgit v0.12