aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindUTF8PROC.cmake
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2019-12-15 21:17:16 -0500
committerJames McCoy <jamessan@jamessan.com>2019-12-15 21:17:16 -0500
commit6566251d144d2c9c9e08e05c8c3a3fe9915a19b8 (patch)
tree980fd0c7287e295c8ac72858b0794f72224415e0 /cmake/FindUTF8PROC.cmake
parent9c4223215f71e1212462ada4e698be1b31437dd9 (diff)
parent9f3d483c79f03c48239fdc82cc02e8685a03d22a (diff)
downloadrneovim-6566251d144d2c9c9e08e05c8c3a3fe9915a19b8.tar.gz
rneovim-6566251d144d2c9c9e08e05c8c3a3fe9915a19b8.tar.bz2
rneovim-6566251d144d2c9c9e08e05c8c3a3fe9915a19b8.zip
Merge remote-tracking branch 'upstream/master' into libcall
Diffstat (limited to 'cmake/FindUTF8PROC.cmake')
-rw-r--r--cmake/FindUTF8PROC.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/cmake/FindUTF8PROC.cmake b/cmake/FindUTF8PROC.cmake
new file mode 100644
index 0000000000..fdb462b779
--- /dev/null
+++ b/cmake/FindUTF8PROC.cmake
@@ -0,0 +1,16 @@
+# - Try to find utf8proc
+# Once done this will define
+# UTF8PROC_FOUND - System has utf8proc
+# UTF8PROC_INCLUDE_DIRS - The utf8proc include directories
+# UTF8PROC_LIBRARIES - The libraries needed to use utf8proc
+
+include(LibFindMacros)
+
+set(UTF8PROC_NAMES utf8proc)
+if(MSVC)
+ # "utf8proc_static" is used for MSVC (when built statically from third-party).
+ # https://github.com/JuliaStrings/utf8proc/commit/0975bf9b6.
+ list(APPEND UTF8PROC_NAMES utf8proc_static)
+endif()
+libfind_pkg_detect(UTF8PROC utf8proc FIND_PATH utf8proc.h FIND_LIBRARY ${UTF8PROC_NAMES})
+libfind_process(UTF8PROC REQUIRED)