]> git.saurik.com Git - apt.git/blame - CMake/FindIconv.cmake
The entire concept of PendingError() is flawed :/.
[apt.git] / CMake / FindIconv.cmake
CommitLineData
01d207a5
JAK
1find_path(ICONV_INCLUDE_DIR NAMES iconv.h)
2
3find_library(ICONV_LIBRARY NAMES iconv)
4if (ICONV_LIBRARY)
5 set(ICONV_SYMBOL_FOUND "${ICONV_LIBRARY}")
6else()
7 check_function_exists(iconv_open ICONV_SYMBOL_FOUND)
8endif()
9
10include(FindPackageHandleStandardArgs)
11find_package_handle_standard_args(Iconv DEFAULT_MESSAGE ICONV_INCLUDE_DIR ICONV_SYMBOL_FOUND)
12
13if(ICONV_LIBRARY)
14 set(ICONV_LIBRARIES "${ICONV_LIBRARY}")
15else()
16 set(ICONV_LIBRARIES)
17endif()
18set(ICONV_INCLUDE_DIRS "${ICONV_INCLUDE_DIR}")
19
20mark_as_advanced(ICONV_LIBRARY ICONV_INCLUDE_DIR)