This commit is contained in:
xiaoyifang 2024-11-19 15:19:39 +08:00
parent aa044a6f0a
commit 516732e475

View file

@ -77,10 +77,6 @@ if (WITH_EPWING_SUPPORT)
endif ()
if (WITH_ZIM)
if (APPLE)
# ICU from homebrew is "key-only", we need to manually prioritize it -> see `brew info icu4c`
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/icu4c@76/lib/pkgconfig:/opt/homebrew/opt/icu4c@76/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:/opt/homebrew/opt/icu4c/lib/pkgconfig")
endif ()
pkg_check_modules(ZIM REQUIRED IMPORTED_TARGET libzim)
target_link_libraries(${GOLDENDICT} PRIVATE PkgConfig::ZIM)
@ -98,7 +94,7 @@ if (WITH_ZIM)
message(STATUS "icu4c path:${BREW_OUTPUT}")
# ICU
# CMAKE_PREFIX_PATH
set(ICU_ROOT "/usr/local/opt/icu4c")
set(ICU_ROOT "${BREW_OUTPUT}")
find_package(ICU REQUIRED COMPONENTS i18n data uc)
message(STATUS "ICU_LIBRARIES: ${ICU_LIBRARIES}")