File: FindIconv.cmake

package info (click to toggle)
apt 3.1.12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,736 kB
  • sloc: cpp: 71,048; sh: 31,750; xml: 5,553; perl: 217; python: 197; ansic: 191; makefile: 41
file content (20 lines) | stat: -rw-r--r-- 557 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
find_path(ICONV_INCLUDE_DIR NAMES iconv.h)

find_library(ICONV_LIBRARY NAMES iconv)
if (ICONV_LIBRARY)
    set(ICONV_SYMBOL_FOUND "${ICONV_LIBRARY}")
else()
    check_function_exists(iconv_open ICONV_SYMBOL_FOUND)
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Iconv DEFAULT_MESSAGE ICONV_INCLUDE_DIR ICONV_SYMBOL_FOUND)

if(ICONV_LIBRARY)
    set(ICONV_LIBRARIES "${ICONV_LIBRARY}")
else()
    set(ICONV_LIBRARIES)
endif()
set(ICONV_INCLUDE_DIRS "${ICONV_INCLUDE_DIR}")

mark_as_advanced(ICONV_LIBRARY ICONV_INCLUDE_DIR)