summaryrefslogtreecommitdiffstats
path: root/coin/instructions
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-04-28 13:52:35 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-05-01 19:11:22 +0200
commitf2ae9b3baa41adb8f0f92e801e06f45a09a871a5 (patch)
treef7536d30d8673cf4978c26bc387d2a7adab6675d /coin/instructions
parentc571cb71a704e95ff1ace4f4a8b5044fdf9c7656 (diff)
CMake: Adjust instructions for MinGW builds
Don't do any of the MSVC-related instructions when targeting MinGW. Make sure to pass gcc and g++ as compilers when targeting MinGW. Don't use any ENV_PREFIX that sets up the MSVC environment. Task-number: QTBUG-75578 Change-Id: Icf5c39b58391d473d914fe8dc17d062812b07df1 Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Diffstat (limited to 'coin/instructions')
-rw-r--r--coin/instructions/prepare_building_env.yaml66
1 files changed, 48 insertions, 18 deletions
diff --git a/coin/instructions/prepare_building_env.yaml b/coin/instructions/prepare_building_env.yaml
index e03179a0e8..5e781bdff4 100644
--- a/coin/instructions/prepare_building_env.yaml
+++ b/coin/instructions/prepare_building_env.yaml
@@ -38,9 +38,14 @@ instructions:
variableName: CONFIGURE_ARGS
variableValue: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ "
enable_if:
- condition: property
- property: host.compiler
- contains_value: GCC
+ condition: or
+ conditions:
+ - condition: property
+ property: host.compiler
+ contains_value: GCC
+ - condition: property
+ property: host.compiler
+ contains_value: Mingw
- type: PrependToEnvironmentVariable
variableName: CONFIGURE_ARGS
variableValue: "-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe "
@@ -60,9 +65,14 @@ instructions:
# Export TARGET_ARCHITECTURE and WINDOWS_SDK_VERSION for MSVC cross compilation
- type: Group
enable_if:
- condition: property
- property: host.os
- equals_value: Windows
+ condition: and
+ conditions:
+ - condition: property
+ property: host.os
+ equals_value: Windows
+ - condition: property
+ property: host.compiler
+ not_contains_value: Mingw
instructions:
- type: EnvironmentVariable
variableName: TARGET_ARCHITECTURE
@@ -114,9 +124,14 @@ instructions:
# or we use compiler specific generator (probably superior solution as it allows to get rid of ENV_PREFIX).
- type: Group
enable_if:
- condition: property
- property: host.os
- equals_value: Windows
+ condition: and
+ conditions:
+ - condition: property
+ property: host.os
+ equals_value: Windows
+ - condition: property
+ property: host.compiler
+ not_contains_value: Mingw
instructions:
# Try to pick one of many coexistent MSVC installation to use
# TODO cleanup, that could be much simpler if all tools are installed to similar paths, so it would
@@ -183,23 +198,38 @@ instructions:
maxTimeInSeconds: 20
maxTimeBetweenOutput: 20
enable_if:
- condition: property
- property: host.os
- equals_value: Windows
+ condition: and
+ conditions:
+ - condition: property
+ property: host.os
+ equals_value: Windows
+ - condition: property
+ property: host.compiler
+ not_contains_value: Mingw
- type: EnvironmentVariable
variableName: ENV_PREFIX
variableValue: "c:\\users\\qt\\prefix.bat"
enable_if:
- condition: property
- property: host.os
- equals_value: Windows
+ condition: and
+ conditions:
+ - condition: property
+ property: host.os
+ equals_value: Windows
+ - condition: property
+ property: host.compiler
+ not_contains_value: Mingw
- type: EnvironmentVariable
variableName: ENV_PREFIX
variableValue: ""
disable_if:
- condition: property
- property: host.os
- equals_value: Windows
+ condition: and
+ conditions:
+ - condition: property
+ property: host.os
+ equals_value: Windows
+ - condition: property
+ property: host.compiler
+ not_contains_value: Mingw
- type: Group
instructions: