This commit is contained in:
xiaoyifang 2024-11-19 16:13:31 +08:00
parent d839b3488d
commit a8403dcf29
2 changed files with 9 additions and 11 deletions

View file

@ -39,11 +39,11 @@ jobs:
libogg \ libogg \
libvorbis \ libvorbis \
libzim \ libzim \
icu4c \
lzip \ lzip \
ninja \ ninja \
opencc \ opencc \
xapian xapian
brew install icu4c --force
- name: Install eb - name: Install eb
run: | run: |
git clone https://github.com/xiaoyifang/eb.git git clone https://github.com/xiaoyifang/eb.git

View file

@ -79,15 +79,13 @@ endif ()
if (WITH_ZIM) if (WITH_ZIM)
if (APPLE) if (APPLE)
# brew list if (EXISTS /opt/homebrew)
execute_process( set(ENV{PKG_CONFIG_PATH} "/opt/homebrew/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
COMMAND brew --prefix libzim endif()
OUTPUT_VARIABLE LIBZIM_PATH
) if (EXISTS /usr/local)
message(STATUS "zim path:${LIBZIM_PATH}") set(ENV{PKG_CONFIG_PATH} "/usr/local/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
# ICU from homebrew is "key-only", we need to manually prioritize it -> see `brew info icu4c` endif()
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${LIBZIM_PATH}/lib/pkgconfig")
endif () endif ()
pkg_check_modules(ZIM REQUIRED IMPORTED_TARGET libzim) pkg_check_modules(ZIM REQUIRED IMPORTED_TARGET libzim)
target_link_libraries(${GOLDENDICT} PRIVATE PkgConfig::ZIM) target_link_libraries(${GOLDENDICT} PRIVATE PkgConfig::ZIM)