tools/win32/configure*.ps1: allow custom $CMAKE_ARGS (JSON array)

This commit is contained in:
Alexander A. Klimov 2025-01-21 17:50:39 +01:00
parent f96e7c67ee
commit 4175a47314
2 changed files with 10 additions and 2 deletions

View File

@ -27,6 +27,9 @@ if (-not (Test-Path env:CMAKE_GENERATOR)) {
if (-not (Test-Path env:CMAKE_GENERATOR_PLATFORM)) {
$env:CMAKE_GENERATOR_PLATFORM = 'x64'
}
if (-not (Test-Path env:CMAKE_ARGS)) {
$env:CMAKE_ARGS = '[]'
}
if (-not (Test-Path env:OPENSSL_ROOT_DIR)) {
$env:OPENSSL_ROOT_DIR = 'c:\local\OpenSSL-Win64'
}
@ -60,7 +63,8 @@ if (Test-Path CMakeCache.txt) {
-DBOOST_LIBRARYDIR="$env:BOOST_LIBRARYDIR" `
-DBOOST_INCLUDEDIR="$env:BOOST_ROOT" `
-DFLEX_EXECUTABLE="$env:FLEX_BINARY" `
-DBISON_EXECUTABLE="$env:BISON_BINARY"
-DBISON_EXECUTABLE="$env:BISON_BINARY" `
$(ConvertFrom-Json -InputObject "$env:CMAKE_ARGS")
cd "$sourcePath"

View File

@ -29,6 +29,9 @@ if (-not (Test-Path env:CMAKE_GENERATOR_PLATFORM)) {
$env:CMAKE_GENERATOR_PLATFORM = 'x64'
}
}
if (-not (Test-Path env:CMAKE_ARGS)) {
$env:CMAKE_ARGS = '[]'
}
if (-not (Test-Path env:OPENSSL_ROOT_DIR)) {
$env:OPENSSL_ROOT_DIR = "c:\local\OpenSSL_3_0_14-Win${env:BITS}"
}
@ -63,7 +66,8 @@ if (Test-Path CMakeCache.txt) {
-DBOOST_LIBRARYDIR="$env:BOOST_LIBRARYDIR" `
-DBOOST_INCLUDEDIR="$env:BOOST_ROOT" `
-DFLEX_EXECUTABLE="$env:FLEX_BINARY" `
-DBISON_EXECUTABLE="$env:BISON_BINARY"
-DBISON_EXECUTABLE="$env:BISON_BINARY" `
$(ConvertFrom-Json -InputObject "$env:CMAKE_ARGS")
cd "$sourcePath"