mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 15:20:56 -06:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user