From cc4d040f1d39c431f8c0b83478f53e596b33d03b Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Mon, 18 Nov 2024 04:20:16 -0500 Subject: [PATCH] stop using pkg-config for path --- CMakeLists.txt | 2 +- cmake/Deps_Unix.cmake | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 83969cbd..dc1ed9df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -284,7 +284,7 @@ if (APPLE) set(QT_DEPLOY_TRANSLATIONS_DIR \"Contents/Resources/translations\") qt_deploy_runtime_dependencies( EXECUTABLE \"${Redistributable_APP}\" - ADDITIONAL_LIBRARIES ${BREW_ICU_NEEDED_LIBS} + ADDITIONAL_LIBRARIES ${BREW_ICU_ADDITIONAL_DYLIBS} GENERATE_QT_CONF NO_APP_STORE_COMPLIANCE) qt_deploy_translations() diff --git a/cmake/Deps_Unix.cmake b/cmake/Deps_Unix.cmake index 043c3362..f382487c 100644 --- a/cmake/Deps_Unix.cmake +++ b/cmake/Deps_Unix.cmake @@ -88,18 +88,19 @@ if (WITH_ZIM) COMMAND_ERROR_IS_FATAL ANY) message(STATUS "Found correct homebrew icu path -> ${ICU_REQUIRED_BY_ZIM_PREFIX}") set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${ICU_REQUIRED_BY_ZIM_PREFIX}/lib/pkgconfig") - message(STATUS "$ENV{PKG_CONFIG_PATH}:${ICU_REQUIRED_BY_ZIM_PREFIX}/lib/pkgconfig") + message(STATUS "Updated pkg_config_path -> $ENV{PKG_CONFIG_PATH}:${ICU_REQUIRED_BY_ZIM_PREFIX}/lib/pkgconfig") + + # icu4c as transitive dependency of libzim may not be automatically copied into app bundle + # so we manually discover the icu4c from homebrew, then find the relevent dylibs + set(BREW_ICU_ADDITIONAL_DYLIBS "${ICU_REQUIRED_BY_ZIM_PREFIX}/lib/libicudata.dylib ${BREW_ICU_LIBRARY_DIRS}/lib/libicui18n.dylib ${BREW_ICU_LIBRARY_DIRS}/lib/libicuuc.dylib") + message(STATUS "Additional ICU `.dylib`s -> ${BREW_ICU_NEEDED_LIBS}") endif () pkg_check_modules(ZIM REQUIRED IMPORTED_TARGET libzim) target_link_libraries(${GOLDENDICT} PRIVATE PkgConfig::ZIM) if (APPLE) - # icu4c as transitive dependency of libzim may not be automatically copied into app bundle - # so we manually discover the icu4c from homebrew, then find the relevent dylibs - pkg_check_modules(BREW_ICU REQUIRED IMPORTED_TARGET icu-i18n icu-uc) - set(BREW_ICU_NEEDED_LIBS "${BREW_ICU_LIBRARY_DIRS}/libicudata.dylib ${BREW_ICU_LIBRARY_DIRS}/libicui18n.dylib ${BREW_ICU_LIBRARY_DIRS}/libicuuc.dylib") - message(STATUS "Additional Libs -> ${BREW_ICU_NEEDED_LIBS}") + endif () endif ()