Merge pull request #10312 from Icinga/win-configure-cmake-opts

tools/win32/configure*.ps1: allow custom $CMAKE_ARGS (JSON array)
This commit is contained in:
Alexander Aleksandrovič Klimov 2025-01-22 10:09:55 +01:00 committed by GitHub
commit d55c3644a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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_15-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"