From d3ec525b7d6ecd8de064d3f3a54d112769d1d3b3 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sat, 11 Oct 2025 14:19:39 -0400 Subject: Add unicode support to justify --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b03d8e2..ef829da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,14 +11,20 @@ if (CMAKE_C_COMPILER_ID STREQUAL "Clang") add_compile_options(-Wall -Wextra -ansi) endif() +# Find ICU library using pkg-config +find_package(PkgConfig REQUIRED) +pkg_check_modules(ICU REQUIRED IMPORTED_TARGET icu-uc icu-i18n) + set(SRC_FILES src/linebuffer.c src/word.c + src/utf8.c src/main.c ) include_directories(src) add_executable(justify ${SRC_FILES}) +target_link_libraries(justify PkgConfig::ICU) install(TARGETS justify RUNTIME DESTINATION bin) install(FILES doc/justify.1 DESTINATION share/man/man1) -- cgit v1.2.3