(Windows) Added the ICU library as a dependency

This commit is contained in:
Leon Styhre 2024-08-09 17:24:08 +02:00
parent 2bbcdd375c
commit 22478ed145
4 changed files with 58 additions and 8 deletions

View file

@ -488,6 +488,7 @@ elseif(WIN32)
${CMAKE_CURRENT_SOURCE_DIR}/external/freetype/include
${CMAKE_CURRENT_SOURCE_DIR}/external/gettext/include
${CMAKE_CURRENT_SOURCE_DIR}/external/harfbuzz/src
${CMAKE_CURRENT_SOURCE_DIR}/external/icu/icu4c/source/common
${CMAKE_CURRENT_SOURCE_DIR}/external/libgit2/include
${CMAKE_CURRENT_SOURCE_DIR}/external/pugixml/src
${CMAKE_CURRENT_SOURCE_DIR}/external/SDL2)
@ -572,6 +573,9 @@ elseif(WIN32)
${PROJECT_SOURCE_DIR}/git2.lib
${PROJECT_SOURCE_DIR}/glew32.lib
${PROJECT_SOURCE_DIR}/harfbuzz.lib
${PROJECT_SOURCE_DIR}/icudt.lib
${PROJECT_SOURCE_DIR}/icuin.lib
${PROJECT_SOURCE_DIR}/icuuc.lib
${PROJECT_SOURCE_DIR}/libcurl-x64.lib
${PROJECT_SOURCE_DIR}/libintl-8.lib
${PROJECT_SOURCE_DIR}/freetype.lib

View file

@ -162,6 +162,9 @@ if(WIN32)
../git2.dll
../glew32.dll
../harfbuzz.dll
../icudt75.dll
../icuin75.dll
../icuuc75.dll
../libcrypto-3-x64.dll
../libcurl-x64.dll
../libiconv-2.dll

View file

@ -4,7 +4,7 @@
:: Windows_dependencies_build.bat
::
:: Builds the external dependencies in-tree using MSVC.
:: The Windows_dependencies_setup_MSVC.bat script must have been executed prior to this.
:: The Windows_dependencies_setup.bat script must have been executed prior to this.
:: All libraries will be recompiled from scratch every time.
::
:: This script needs to run from the root of the repository.
@ -17,15 +17,35 @@ if not exist .clang-format (
)
if not exist external\pugixml\ (
echo You need to first run tools\Windows_dependencies_setup_MSVC.bat to download and configure the dependencies.
echo You need to first run tools\Windows_dependencies_setup.bat to download and configure the dependencies.
goto end
)
echo Building all dependencies in the .\external directory...
echo:
cd external
echo Building all dependencies in the .\external directory...
echo:
echo Building ICU
if not exist icu/icu4c\ (
echo icu/icu4c directory is missing, aborting.
cd ..
goto end
)
cd icu/icu4c
msbuild source\allinone\allinone.sln /p:Configuration=Release /p:Platform=x64 /p:SkipUWP=true
copy /Y bin64\icudt75.dll ..\..\..\
copy /Y bin64\icuin75.dll ..\..\..\
copy /Y bin64\icuuc75.dll ..\..\..\
copy /Y lib64\icudt.lib ..\..\..\
copy /Y lib64\icuin.lib ..\..\..\
copy /Y lib64\icuuc.lib ..\..\..\
cd ..\..
echo:
echo Building HarfBuzz
if not exist harfbuzz\build\ (
@ -46,6 +66,7 @@ copy /Y harfbuzz.dll ..\..\..\
copy /Y harfbuzz.lib ..\..\..\
cd ..\..
echo:
echo Building FreeType
if not exist freetype\build\ (
@ -66,6 +87,7 @@ copy /Y freetype.dll ..\..\..\
copy /Y freetype.lib ..\..\..\
cd ..\..
echo:
echo Building libgit2
if not exist libgit2\build\ (

View file

@ -28,11 +28,11 @@ if %ERRORLEVEL% neq 0 (
goto end
)
echo Setting up dependencies in the .\external directory...
echo:
cd external
echo Setting up dependencies in the .\external directory...
echo:
echo Setting up gettext
if exist gettext\ (
@ -68,6 +68,27 @@ copy /Y libintl-8.lib ..\..\..
copy /Y libiconv-2.dll ..\..\..
cd ..\..
echo:
echo Setting up ICU
if exist icu\ (
rmdir /S /Q icu
)
git clone -n --filter=tree:0 https://github.com/unicode-org/icu.git
if not exist icu\ (
echo icu directory is missing, aborting.
cd ..
goto end
)
cd icu
git sparse-checkout set --no-cone icu4c
git checkout release-75-1
cd ..
echo:
echo Setting up curl
if exist curl-8.2.1_11-win64-mingw\ (