1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 15:09:43 +00:00

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.
This commit is contained in:
AnyOldName3 2022-05-02 19:49:30 +01:00
parent 699c1db1d8
commit eedae407ab

View file

@ -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"