Skip to content

Prepare Windows build scripts for builds with Visual Studio 2019 #8390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
---
version: 2.11.0.dev.{build}

os: Visual Studio 2017
os: Visual Studio 2019
platform: x64

environment:
BITS: 64
CMAKE_BUILD_TYPE: Debug
CMAKE_GENERATOR: "Visual Studio 15 2017 Win64"
CMAKE_GENERATOR: "Visual Studio 16 2019"
CMAKE_GENERATOR_PLATFORM: x64
# https://www.appveyor.com/docs/windows-images-software/#boost
BOOST_ROOT: 'C:\Libraries\boost_1_67_0'
BOOST_LIBRARYDIR: 'C:\Libraries\boost_1_67_0\lib64-msvc-14.1'
BOOST_ROOT: 'C:\Libraries\boost_1_71_0'
BOOST_LIBRARYDIR: 'C:\Libraries\boost_1_71_0\lib64-msvc-14.2'
# https://www.appveyor.com/docs/windows-images-software/#tools
OPENSSL_ROOT_DIR: 'C:\OpenSSL-v111-Win64'
BISON_BINARY: 'C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_bison.exe'
Expand Down
13 changes: 8 additions & 5 deletions tools/win32/configure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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" `
Expand Down
2 changes: 1 addition & 1 deletion tools/win32/load-vsenv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down