Skip to content

Commit 8550c01

Browse files
authored
Merge pull request #8886 from Icinga/feature/windows-build-scripts-32-bit-212
Windows build scripts: allow setting BITS=32 to use 32 bit dependency paths by default
2 parents 09b5624 + 2fd8e13 commit 8550c01

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

tools/win32/configure.ps1

+11-4
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,24 @@ if (-not ($env:PATH -contains $env:CMAKE_PATH)) {
1919
if (-not (Test-Path env:CMAKE_GENERATOR)) {
2020
$env:CMAKE_GENERATOR = 'Visual Studio 16 2019'
2121
}
22+
if (-not (Test-Path env:BITS)) {
23+
$env:BITS = 64
24+
}
2225
if (-not (Test-Path env:CMAKE_GENERATOR_PLATFORM)) {
23-
$env:CMAKE_GENERATOR_PLATFORM = 'x64'
26+
if ($env:BITS -eq 32) {
27+
$env:CMAKE_GENERATOR_PLATFORM = 'Win32'
28+
} else {
29+
$env:CMAKE_GENERATOR_PLATFORM = 'x64'
30+
}
2431
}
2532
if (-not (Test-Path env:OPENSSL_ROOT_DIR)) {
26-
$env:OPENSSL_ROOT_DIR = 'c:\local\OpenSSL_1_1_1k-Win64'
33+
$env:OPENSSL_ROOT_DIR = "c:\local\OpenSSL_1_1_1k-Win${env:BITS}"
2734
}
2835
if (-not (Test-Path env:BOOST_ROOT)) {
29-
$env:BOOST_ROOT = 'c:\local\boost_1_71_0-Win64'
36+
$env:BOOST_ROOT = "c:\local\boost_1_71_0-Win${env:BITS}"
3037
}
3138
if (-not (Test-Path env:BOOST_LIBRARYDIR)) {
32-
$env:BOOST_LIBRARYDIR = 'c:\local\boost_1_71_0-Win64\lib64-msvc-14.2'
39+
$env:BOOST_LIBRARYDIR = "c:\local\boost_1_71_0-Win${env:BITS}\lib${env:BITS}-msvc-14.2"
3340
}
3441
if (-not (Test-Path env:FLEX_BINARY)) {
3542
$env:FLEX_BINARY = 'C:\ProgramData\chocolatey\bin\win_flex.exe'

0 commit comments

Comments
 (0)