diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 21:52:58 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 21:52:58 +0000 |
commit | 931bffbda3668ddc609fc1da8f9eb576b170aa52 (patch) | |
tree | d8c1843a95da5ea0bb4acc09f7e37843d9995c86 /cmake/FindIconv.cmake | |
parent | 142d9041391780ac15b89886a54015fdc5c73995 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-userreg.tar.gz rneovim-userreg.tar.bz2 rneovim-userreg.zip |
Merge remote-tracking branch 'upstream/master' into userreguserreg
Diffstat (limited to 'cmake/FindIconv.cmake')
-rw-r--r-- | cmake/FindIconv.cmake | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake index 63290fe889..e607c59cf6 100644 --- a/cmake/FindIconv.cmake +++ b/cmake/FindIconv.cmake @@ -1,21 +1,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. -# - Try to find iconv -# Once done, this will define -# -# Iconv_FOUND - system has iconv -# Iconv_INCLUDE_DIRS - the iconv include directories -# Iconv_LIBRARIES - link these to use iconv - -include(LibFindMacros) - -find_path(ICONV_INCLUDE_DIR NAMES iconv.h) -find_library(ICONV_LIBRARY NAMES iconv libiconv) - -set(Iconv_PROCESS_INCLUDES ICONV_INCLUDE_DIR) +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) - set(Iconv_PROCESS_LIBS ICONV_LIBRARY) + target_link_libraries(iconv INTERFACE ${ICONV_LIBRARY}) endif() - -libfind_process(Iconv) |