-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfreetype_windows.bat
34 lines (26 loc) · 1.26 KB
/
freetype_windows.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
mkdir build
mkdir build\freetype
mkdir build\freetype\windows-debug
mkdir build\freetype\windows-release
set FLAGS=
set FLAGS=%FLAGS% -DBUILD_SHARED_LIBS=OFF
set FLAGS=%FLAGS% -DCMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE
set FLAGS=%FLAGS% -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE
set FLAGS=%FLAGS% -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
set FLAGS=%FLAGS% -DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE
set FLAGS=%FLAGS% -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=TRUE
robocopy freetype-2.13.2 freetypebuild /E /NFL /NDL /NJH /NJS /NP
mkdir freetypebuild\build
cd freetypebuild\build
REM Freetype has no static CRT option and no easy way to hack it in from batch
REM So add the following lines above the cpack stuff:
REM string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
REM string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
cmake -G "Visual Studio 17 2022" -A x64 %FLAGS% ..
msbuild /maxcpucount ALL_BUILD.vcxproj
msbuild /maxcpucount /p:Configuration=Release ALL_BUILD.vcxproj
cd ..\..
copy freetypebuild\build\Debug\freetyped.lib build\freetype\windows-debug\freetype.lib
copy freetypebuild\build\Debug\freetyped.pdb build\freetype\windows-debug
copy freetypebuild\build\Release\freetype.lib build\freetype\windows-release
rmdir /S /Q freetypebuild