diff options
author | dundargoc <gocdundar@gmail.com> | 2024-06-12 17:04:58 +0200 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2024-06-28 19:47:39 +0200 |
commit | 32e16cb0b6b046ba45d3e14c0fdb0383ad8bee1e (patch) | |
tree | d5d4af25bf0bbc19bcdbb66e2d0e79b9102ef26f /cmake | |
parent | 46187117c9464dd6c09eae8e47bb279d72a01038 (diff) | |
download | rneovim-32e16cb0b6b046ba45d3e14c0fdb0383ad8bee1e.tar.gz rneovim-32e16cb0b6b046ba45d3e14c0fdb0383ad8bee1e.tar.bz2 rneovim-32e16cb0b6b046ba45d3e14c0fdb0383ad8bee1e.zip |
build: add utf8proc as dependency
utf8proc contains all the data which is currently in
unicode_tables.generated.h internally, but in quite a different format.
Ideally unicode_tables.generated.h should be removed as well so we rely
solely on utf8proc. We want to avoid a situation where the possibility
of unicode mismatch occurs, e.g a distro using both unicode 12 and
unicode 13.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindUTF8proc.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/FindUTF8proc.cmake b/cmake/FindUTF8proc.cmake new file mode 100644 index 0000000000..2183f35d34 --- /dev/null +++ b/cmake/FindUTF8proc.cmake @@ -0,0 +1,12 @@ +find_path2(UTF8PROC_INCLUDE_DIR utf8proc.h) +find_library2(UTF8PROC_LIBRARY NAMES utf8proc utf8proc_static) +find_package_handle_standard_args(UTF8proc DEFAULT_MSG + UTF8PROC_LIBRARY UTF8PROC_INCLUDE_DIR) +mark_as_advanced(UTF8PROC_LIBRARY UTF8PROC_INCLUDE_DIR) + +add_library(utf8proc INTERFACE) +target_include_directories(utf8proc SYSTEM BEFORE INTERFACE ${UTF8PROC_INCLUDE_DIR}) +target_link_libraries(utf8proc INTERFACE ${UTF8PROC_LIBRARY}) + +#TODO(dundargoc): this is a hack that should ideally be hardcoded into the utf8proc project via configure_command +target_compile_definitions(utf8proc INTERFACE "UTF8PROC_STATIC") |