]> git.saurik.com Git - apt.git/blob - CMake/FindIconv.cmake
http: skip connection cleanup if we close it anyhow
[apt.git] / CMake / FindIconv.cmake
1 find_path(ICONV_INCLUDE_DIR NAMES iconv.h)
2
3 find_library(ICONV_LIBRARY NAMES iconv)
4 if (ICONV_LIBRARY)
5 set(ICONV_SYMBOL_FOUND "${ICONV_LIBRARY}")
6 else()
7 check_function_exists(iconv_open ICONV_SYMBOL_FOUND)
8 endif()
9
10 include(FindPackageHandleStandardArgs)
11 find_package_handle_standard_args(Iconv DEFAULT_MESSAGE ICONV_INCLUDE_DIR ICONV_SYMBOL_FOUND)
12
13 if(ICONV_LIBRARY)
14 set(ICONV_LIBRARIES "${ICONV_LIBRARY}")
15 else()
16 set(ICONV_LIBRARIES)
17 endif()
18 set(ICONV_INCLUDE_DIRS "${ICONV_INCLUDE_DIR}")
19
20 mark_as_advanced(ICONV_LIBRARY ICONV_INCLUDE_DIR)