diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2023-12-04 15:44:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 15:44:57 +0000 |
commit | 88e6591b09c84ea8ecd5a576e6c9c5dbe565819a (patch) | |
tree | b7e42f6a25bb2df7fd18a2e82a7a778a4eb01dd7 | |
parent | 8bbd3fed06087243861a6d6ec9c58dd8858ab34c (diff) | |
parent | 3f4010db1acc60c7ce347f92a45767ccb4186f37 (diff) | |
download | ledger-88e6591b09c84ea8ecd5a576e6c9c5dbe565819a.tar.gz ledger-88e6591b09c84ea8ecd5a576e6c9c5dbe565819a.tar.bz2 ledger-88e6591b09c84ea8ecd5a576e6c9c5dbe565819a.zip |
Merge pull request #2307 from afh/improve-icu
Improve finding ICU libraries
-rw-r--r-- | CMakeLists.txt | 9 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | flake.nix | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ab17cedd..e6b1270d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,6 +107,9 @@ endif() ######################################################################## +include(FindICU) +find_package(ICU 63 OPTIONAL_COMPONENTS uc i18n) + include(CheckIncludeFiles) include(CheckLibraryExists) include(CheckFunctionExists) @@ -159,8 +162,8 @@ endif() cmake_push_check_state() -set(CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH} ${Boost_INCLUDE_DIRS}) -set(CMAKE_REQUIRED_LIBRARIES ${Boost_LIBRARIES} icuuc ${PROFILE_LIBS}) +set(CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH} ${Boost_INCLUDE_DIRS} ${ICUE_INCLUDE_DIRS}) +set(CMAKE_REQUIRED_LIBRARIES ${Boost_LIBRARIES} ${ICU_LIBRARIES} ${PROFILE_LIBS}) check_cxx_source_runs(" #include <boost/regex/icu.hpp> @@ -298,7 +301,7 @@ macro(add_ledger_library_dependencies _target) target_link_libraries(${_target} ${Boost_LIBRARIES}) endif() if (HAVE_BOOST_REGEX_UNICODE) - target_link_libraries(${_target} icuuc) + target_link_libraries(${_target} ${ICU_LIBRARIES}) endif() target_link_libraries(${_target} ${PROFILE_LIBS}) endmacro(add_ledger_library_dependencies _target) @@ -63,6 +63,7 @@ Dependency | Version (or greater) [Gmp] | 6.1.2 [Mpfr] | 4.0.2 [utfcpp] | 3.2.3 +[ICU] | 63 _optional_ [gettext] | 0.17 _optional_ [libedit] | 20090111-3.0 _optional_ [Python] | 3.9 _optional_ @@ -189,6 +190,7 @@ hack as much as you like, then [open a pull request on GitHub](https://github.co [GMP]: https://gmplib.org/ [MPFR]: https://www.mpfr.org/ [utfcpp]: https://utfcpp.sourceforge.net +[ICU]: https://icu.unicode.org [gettext]: https://www.gnu.org/software/gettext/ [libedit]: https://thrysoee.dk/editline/ [Python]: https://python.org @@ -25,7 +25,7 @@ outputs = [ "out" "dev" ] ++ lib.optionals usePython [ "py" ]; buildInputs = [ - gmp mpfr gnused + gmp mpfr gnused icu ] ++ lib.optionals useLibedit [ libedit ] ++ lib.optionals useReadline [ |