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>
This commit is contained in:
parent
c571cb71a7
commit
f2ae9b3baa
@ -38,9 +38,14 @@ instructions:
|
|||||||
variableName: CONFIGURE_ARGS
|
variableName: CONFIGURE_ARGS
|
||||||
variableValue: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ "
|
variableValue: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ "
|
||||||
enable_if:
|
enable_if:
|
||||||
condition: property
|
condition: or
|
||||||
|
conditions:
|
||||||
|
- condition: property
|
||||||
property: host.compiler
|
property: host.compiler
|
||||||
contains_value: GCC
|
contains_value: GCC
|
||||||
|
- condition: property
|
||||||
|
property: host.compiler
|
||||||
|
contains_value: Mingw
|
||||||
- type: PrependToEnvironmentVariable
|
- type: PrependToEnvironmentVariable
|
||||||
variableName: CONFIGURE_ARGS
|
variableName: CONFIGURE_ARGS
|
||||||
variableValue: "-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe "
|
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
|
# Export TARGET_ARCHITECTURE and WINDOWS_SDK_VERSION for MSVC cross compilation
|
||||||
- type: Group
|
- type: Group
|
||||||
enable_if:
|
enable_if:
|
||||||
condition: property
|
condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: property
|
||||||
property: host.os
|
property: host.os
|
||||||
equals_value: Windows
|
equals_value: Windows
|
||||||
|
- condition: property
|
||||||
|
property: host.compiler
|
||||||
|
not_contains_value: Mingw
|
||||||
instructions:
|
instructions:
|
||||||
- type: EnvironmentVariable
|
- type: EnvironmentVariable
|
||||||
variableName: TARGET_ARCHITECTURE
|
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).
|
# or we use compiler specific generator (probably superior solution as it allows to get rid of ENV_PREFIX).
|
||||||
- type: Group
|
- type: Group
|
||||||
enable_if:
|
enable_if:
|
||||||
condition: property
|
condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: property
|
||||||
property: host.os
|
property: host.os
|
||||||
equals_value: Windows
|
equals_value: Windows
|
||||||
|
- condition: property
|
||||||
|
property: host.compiler
|
||||||
|
not_contains_value: Mingw
|
||||||
instructions:
|
instructions:
|
||||||
# Try to pick one of many coexistent MSVC installation to use
|
# 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
|
# 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
|
maxTimeInSeconds: 20
|
||||||
maxTimeBetweenOutput: 20
|
maxTimeBetweenOutput: 20
|
||||||
enable_if:
|
enable_if:
|
||||||
condition: property
|
condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: property
|
||||||
property: host.os
|
property: host.os
|
||||||
equals_value: Windows
|
equals_value: Windows
|
||||||
|
- condition: property
|
||||||
|
property: host.compiler
|
||||||
|
not_contains_value: Mingw
|
||||||
- type: EnvironmentVariable
|
- type: EnvironmentVariable
|
||||||
variableName: ENV_PREFIX
|
variableName: ENV_PREFIX
|
||||||
variableValue: "c:\\users\\qt\\prefix.bat"
|
variableValue: "c:\\users\\qt\\prefix.bat"
|
||||||
enable_if:
|
enable_if:
|
||||||
condition: property
|
condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: property
|
||||||
property: host.os
|
property: host.os
|
||||||
equals_value: Windows
|
equals_value: Windows
|
||||||
|
- condition: property
|
||||||
|
property: host.compiler
|
||||||
|
not_contains_value: Mingw
|
||||||
- type: EnvironmentVariable
|
- type: EnvironmentVariable
|
||||||
variableName: ENV_PREFIX
|
variableName: ENV_PREFIX
|
||||||
variableValue: ""
|
variableValue: ""
|
||||||
disable_if:
|
disable_if:
|
||||||
condition: property
|
condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: property
|
||||||
property: host.os
|
property: host.os
|
||||||
equals_value: Windows
|
equals_value: Windows
|
||||||
|
- condition: property
|
||||||
|
property: host.compiler
|
||||||
|
not_contains_value: Mingw
|
||||||
|
|
||||||
- type: Group
|
- type: Group
|
||||||
instructions:
|
instructions:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user