Use the correct build type for dependencies (Windows)

Always building with the Release configuration caused issues (e.g.
linking) when attempting to build non-release configurations when using
the CI build scripts.
This is not done for OpenCV as it does not support all build types.
This commit is contained in:
WarmUpTill 2023-07-02 03:29:35 +02:00 committed by WarmUpTill
parent 300ad15ad0
commit 592f31f059

View File

@ -104,7 +104,7 @@ function Build {
'-G', $CmakeGenerator
"-DCMAKE_SYSTEM_VERSION=${script:PlatformSDK}"
"-DCMAKE_GENERATOR_PLATFORM=$(if (${script:Target} -eq "x86") { "Win32" } else { "x64" })"
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_BUILD_TYPE=${Configuration}"
"-DCMAKE_PREFIX_PATH:PATH=${DepInstallPath}"
"-DCMAKE_INSTALL_PREFIX:PATH=${DepInstallPath}"
"-DSW_BUILD=OFF"
@ -115,7 +115,7 @@ function Build {
Invoke-External cmake -S ${LeptonicaPath} -B ${LeptonicaBuildPath} @LeptonicaCmakeArgs
$LeptonicaCmakeArgs = @(
'--config', "Release"
'--config', "${Configuration}"
)
if ( $VerbosePreference -eq 'Continue' ) {
@ -140,7 +140,7 @@ function Build {
'-G', $CmakeGenerator
"-DCMAKE_SYSTEM_VERSION=${script:PlatformSDK}"
"-DCMAKE_GENERATOR_PLATFORM=$(if (${script:Target} -eq "x86") { "Win32" } else { "x64" })"
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_BUILD_TYPE=${Configuration}"
"-DCMAKE_PREFIX_PATH:PATH=${DepInstallPath}"
"-DCMAKE_INSTALL_PREFIX:PATH=${DepInstallPath}"
"-DSW_BUILD=OFF"
@ -154,7 +154,7 @@ function Build {
Invoke-External cmake -S ${TesseractPath} -B ${TesseractBuildPath} @TesseractCmakeArgs
$TesseractCmakeArgs = @(
'--config', "Release"
'--config', "${Configuration}"
)
if ( $VerbosePreference -eq 'Continue' ) {