From eedae407ab6cb031c8cdb761a994c0522962e541 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 2 May 2022 19:49:30 +0100 Subject: [PATCH] Tell CMake where to find ICU properly I had a problem where CMake picked up half of ICU from its C API, which is included with the Windows SDK, and half from the C++ API we provide. This should prevent that. * ICU_ROOT takes precedence as a CMake variable so do that instead of as an environment variable. * ICU_LIBRARY is an output of FindICU.cmake, not an input, so don't set it. * FindICU.cmake needs telling about components via their own variables. --- CI/before_script.msvc.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index bdf7d24eb8..17ff27f9f1 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -1066,10 +1066,12 @@ printf "ICU ${ICU_VER/_/.}... " rm -rf ICU-${ICU_VER} eval 7z x -y icu4c-${ICU_VER}-Win${BITS}-MSVC2019.zip -o$(real_pwd)/ICU-${ICU_VER} $STRIP fi - export ICU_ROOT="$(real_pwd)/ICU-${ICU_VER}" - add_cmake_opts -DICU_INCLUDE_DIR="${ICU_ROOT}/include" \ - -DICU_LIBRARY="${ICU_ROOT}/lib${BITS}/icuuc.lib " \ - -DICU_DEBUG=ON + ICU_ROOT="$(real_pwd)/ICU-${ICU_VER}" + add_cmake_opts -DICU_ROOT="${ICU_ROOT}" \ + -DICU_INCLUDE_DIR="${ICU_ROOT}/include" \ + -DICU_I18N_LIBRARY="${ICU_ROOT}/lib${BITS}/icuin.lib " \ + -DICU_UC_LIBRARY="${ICU_ROOT}/lib${BITS}/icuuc.lib " \ + -DICU_DEBUG=ON for config in ${CONFIGURATIONS[@]}; do add_runtime_dlls $config "$(pwd)/ICU-${ICU_VER}/bin${BITS}/icudt${ICU_VER/_*/}.dll"