File: FindIconv.cmake

package info (click to toggle)
neovim 0.10.4-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 63,144 kB
  • sloc: ansic: 255,334; python: 1,470; lisp: 1,213; sh: 1,103; makefile: 363; xml: 78; ruby: 6
file content (14 lines) | stat: -rw-r--r-- 562 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# TODO(dundargoc): FindIconv is shipped by default on cmake version 3.11+. This
# file can be removed once we decide to upgrade minimum cmake version.

find_path2(ICONV_INCLUDE_DIR NAMES iconv.h)
find_library2(ICONV_LIBRARY NAMES iconv libiconv)
find_package_handle_standard_args(Iconv DEFAULT_MSG
  ICONV_INCLUDE_DIR)
mark_as_advanced(ICONV_INCLUDE_DIR ICONV_LIBRARY)

add_library(iconv INTERFACE)
target_include_directories(iconv SYSTEM BEFORE INTERFACE ${ICONV_INCLUDE_DIR})
if(ICONV_LIBRARY)
  target_link_libraries(iconv INTERFACE ${ICONV_LIBRARY})
endif()