Update Windows build scripts for Visual Studio 2019

$env:CMAKE_GENERATOR_PLATFORM is only used in configure-dev.ps1 but now
is also required in configure.ps1 to allow the build pipeline to be
upgraded to Visual Studio 2019.

Additionally bump the versions in paths for Boost and OpenSSL.
This commit is contained in:
Julian Brost 2020-10-20 16:39:19 +02:00
parent a32c1bf910
commit 4ede8e484b
2 changed files with 9 additions and 6 deletions

View File

@ -17,16 +17,19 @@ if (-not ($env:PATH -contains $env:CMAKE_PATH)) {
$env:PATH = $env:CMAKE_PATH + ';' + $env:PATH
}
if (-not (Test-Path env:CMAKE_GENERATOR)) {
$env:CMAKE_GENERATOR = 'Visual Studio 15 2017 Win64'
$env:CMAKE_GENERATOR = 'Visual Studio 16 2019'
}
if (-not (Test-Path env:CMAKE_GENERATOR_PLATFORM)) {
$env:CMAKE_GENERATOR_PLATFORM = 'x64'
}
if (-not (Test-Path env:OPENSSL_ROOT_DIR)) {
$env:OPENSSL_ROOT_DIR = 'c:\local\OpenSSL_1_1_1b-Win64'
$env:OPENSSL_ROOT_DIR = 'c:\local\OpenSSL_1_1_1h-Win64'
}
if (-not (Test-Path env:BOOST_ROOT)) {
$env:BOOST_ROOT = 'c:\local\boost_1_69_0-Win64'
$env:BOOST_ROOT = 'c:\local\boost_1_71_0-Win64'
}
if (-not (Test-Path env:BOOST_LIBRARYDIR)) {
$env:BOOST_LIBRARYDIR = 'c:\local\boost_1_69_0-Win64\lib64-msvc-14.1'
$env:BOOST_LIBRARYDIR = 'c:\local\boost_1_71_0-Win64\lib64-msvc-14.2'
}
if (-not (Test-Path env:FLEX_BINARY)) {
$env:FLEX_BINARY = 'C:\ProgramData\chocolatey\bin\win_flex.exe'
@ -48,7 +51,7 @@ if (Test-Path CMakeCache.txt) {
& cmake.exe "$sourcePath" `
-DCMAKE_BUILD_TYPE="$env:CMAKE_BUILD_TYPE" `
-G "$env:CMAKE_GENERATOR" -DCPACK_GENERATOR=WIX `
-G "$env:CMAKE_GENERATOR" -A "$env:CMAKE_GENERATOR_PLATFORM" -DCPACK_GENERATOR=WIX `
-DICINGA2_WITH_MYSQL=OFF -DICINGA2_WITH_PGSQL=OFF `
-DICINGA2_WITH_LIVESTATUS=OFF -DICINGA2_WITH_COMPAT=OFF `
-DOPENSSL_ROOT_DIR="$env:OPENSSL_ROOT_DIR" `

View File

@ -18,7 +18,7 @@ if (-not (Test-Path $BUILD)) {
if (Test-Path env:VS_INSTALL_PATH) {
$VSBASE = $env:VS_INSTALL_PATH
} else {
$VSBASE = "C:\Program Files (x86)\Microsoft Visual Studio\2017"
$VSBASE = "C:\Program Files (x86)\Microsoft Visual Studio\2019"
}
if (Test-Path env:BITS) {