mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
fix: [macos] icudata missed in the final executable dependencies
This commit is contained in:
parent
652da8e1ec
commit
db8fa45825
2
.github/workflows/Release-all.yml
vendored
2
.github/workflows/Release-all.yml
vendored
|
@ -31,6 +31,7 @@ jobs:
|
|||
brew update
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
vcpkg install libzim
|
||||
brew install \
|
||||
bzip2 \
|
||||
create-dmg \
|
||||
|
@ -38,7 +39,6 @@ jobs:
|
|||
libiconv \
|
||||
libogg \
|
||||
libvorbis \
|
||||
libzim \
|
||||
lzip \
|
||||
ninja \
|
||||
opencc \
|
||||
|
|
|
@ -86,22 +86,9 @@ if (WITH_ZIM)
|
|||
target_link_libraries(${GOLDENDICT} PRIVATE PkgConfig::ZIM)
|
||||
|
||||
if (APPLE)
|
||||
# icu4c as transitive dependency of libzim may not be copied into app bundle, so we directly depends on it to assist macdeployqt
|
||||
# Why such complexities: 1) System or XCode SDKS's icu exists 2) icu itself is depended by various stuffs and homebrew may need multiple versions of it
|
||||
pkg_check_modules(BREW_ICU REQUIRED IMPORTED_TARGET icu-i18n icu-uc)
|
||||
target_link_libraries(${GOLDENDICT} PUBLIC PkgConfig::BREW_ICU)
|
||||
|
||||
# Verify icu <-> zim matches
|
||||
message("Zim include dirs -> ${ZIM_INCLUDE_DIRS}")
|
||||
message("Homebrew icu include dirs-> ${BREW_ICU_INCLUDE_DIRS}")
|
||||
|
||||
list(GET BREW_ICU_INCLUDE_DIRS 0 ONE_OF_BREW_ICU_INCLUDE_DIR)
|
||||
if (ONE_OF_BREW_ICU_INCLUDE_DIR IN_LIST ZIM_INCLUDE_DIRS)
|
||||
message("ZIM OK!")
|
||||
else ()
|
||||
message(FATAL_ERROR "!!!! ZIM <-> icu error -> check `brew info libzim` and `brew list libzim`")
|
||||
endif ()
|
||||
# TODO: get rid of these 💩, how?
|
||||
# 查找 ICU 库
|
||||
find_package(ICU REQUIRED COMPONENTS i18n data)
|
||||
target_link_libraries(${GOLDENDICT} PUBLIC ${ICU_LIBRARIES})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
|
Loading…
Reference in a new issue