mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
1
This commit is contained in:
parent
d839b3488d
commit
a8403dcf29
2
.github/workflows/Release-all.yml
vendored
2
.github/workflows/Release-all.yml
vendored
|
@ -39,11 +39,11 @@ jobs:
|
|||
libogg \
|
||||
libvorbis \
|
||||
libzim \
|
||||
icu4c \
|
||||
lzip \
|
||||
ninja \
|
||||
opencc \
|
||||
xapian
|
||||
brew install icu4c --force
|
||||
- name: Install eb
|
||||
run: |
|
||||
git clone https://github.com/xiaoyifang/eb.git
|
||||
|
|
|
@ -79,15 +79,13 @@ endif ()
|
|||
if (WITH_ZIM)
|
||||
if (APPLE)
|
||||
|
||||
# 执行 brew list 命令并捕获输出
|
||||
execute_process(
|
||||
COMMAND brew --prefix libzim
|
||||
OUTPUT_VARIABLE LIBZIM_PATH
|
||||
if (EXISTS /opt/homebrew)
|
||||
set(ENV{PKG_CONFIG_PATH} "/opt/homebrew/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
|
||||
endif()
|
||||
|
||||
)
|
||||
message(STATUS "zim path:${LIBZIM_PATH}")
|
||||
# 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}:${LIBZIM_PATH}/lib/pkgconfig")
|
||||
if (EXISTS /usr/local)
|
||||
set(ENV{PKG_CONFIG_PATH} "/usr/local/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
|
||||
endif()
|
||||
endif ()
|
||||
pkg_check_modules(ZIM REQUIRED IMPORTED_TARGET libzim)
|
||||
target_link_libraries(${GOLDENDICT} PRIVATE PkgConfig::ZIM)
|
||||
|
|
Loading…
Reference in a new issue