qt5base-lts/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml
Samuli Piippo 9a74d94ff5 Coin: use CMAKE_STAGING_PREFIX for cross-compilations
Re-apply 9a9b253b68 to use
CMAKE_STAGING_PREFIX in cross-compilation builds.

Amends b7986a8f6e9df3727f433a0df0ba56a3355153d0.

Fixes: QTBUG-102108
Pick-to: 6.3
Change-Id: I8875da2df1427f02be68dd737168d76a8dc4ed2a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-29 21:12:13 +00:00

112 lines
4.0 KiB
YAML

type: Group
instructions:
- type: MakeDirectory
directory: .git
- type: MakeDirectory
directory: build
- type: ChangeDirectory
directory: "{{.BuildDir}}/build"
- type: MakeDirectory
directory: target
- type: Group
instructions:
- type: MakeDirectory
directory: host
- type: SetBuildDirectory
directory: "{{.SourceDir}}/build/host"
- type: ChangeDirectory
directory: "{{.BuildDir}}"
- type: EnvironmentVariable
variableName: COIN_CONFIGURE_ARGS
variableValue: "{{.Env.CONFIGURE_ARGS}}"
- type: EnvironmentVariable
variableName: COIN_CMAKE_ARGS
# Use unix separators even on Windows, to avoid escaping issues the in configure script.
variableValue: "{{.Env.CMAKE_ARGS}} {{.Env.COMMON_CMAKE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{unixPathSeparators .InstallDir}}/host"
- type: EnvironmentVariable
variableName: CONFIGURE_ENV_PREFIX
variableValue: "{{.Env.ENV_PREFIX}}"
- !include "{{qt/qtbase}}/call_configure_qtbase.yaml"
- type: ExecuteCommand
command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake --build . --parallel -v"
maxTimeInSeconds: 6000
maxTimeBetweenOutput: 4800
userMessageOnFailure: >
Failed to build sources.
- type: EnvironmentVariable
variableName: COIN_CMAKE_INSTALL_SCRIPT_PATH
variableValue: "{{.BuildDir}}"
- !include "{{qt/qtbase}}/call_host_install.yaml"
- type: EnvironmentVariable
variableName: DESTDIR
variableValue: "{{.InstallRoot}}"
- !include "{{qt/qtbase}}/call_host_install.yaml"
enable_if:
condition: property
property: platformDependency
equals_value: null
- type: EnvironmentVariable
variableName: DESTDIR
variableValue: ""
- type: SetBuildDirectory
directory: "{{.SourceDir}}/build/target"
- type: ChangeDirectory
directory: "{{.BuildDir}}"
- type: AppendToEnvironmentVariable
variableName: TARGET_CMAKE_ARGS
variableValue: " -DQT_HOST_PATH={{.AgentWorkingDir}}/install"
disable_if:
condition: property
property: platformDependency
equals_value: null
- type: AppendToEnvironmentVariable
variableName: TARGET_CMAKE_ARGS
variableValue: " -DQT_HOST_PATH={{.InstallDir}}/host"
enable_if:
condition: property
property: platformDependency
equals_value: null
- type: EnvironmentVariable
variableName: COIN_CONFIGURE_ARGS
variableValue: "{{.Env.TARGET_CONFIGURE_ARGS}}"
- type: EnvironmentVariable
variableName: COIN_CMAKE_ARGS
# Use unix separators even on Windows, to avoid escaping issues in the configure script.
variableValue: "{{.Env.TARGET_CMAKE_ARGS}} {{.Env.COMMON_TARGET_CMAKE_ARGS}} -DCMAKE_STAGING_PREFIX:PATH={{unixPathSeparators .InstallDir}}/target"
- type: EnvironmentVariable
variableName: CONFIGURE_ENV_PREFIX
variableValue: "{{.Env.TARGET_ENV_PREFIX}}"
- !include "{{qt/qtbase}}/call_configure_qtbase.yaml"
- type: ExecuteCommand
command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake --build . --parallel -v"
maxTimeInSeconds: 6000
maxTimeBetweenOutput: 4800
userMessageOnFailure: >
Failed to build sources.
- type: EnvironmentVariable
variableName: COIN_CMAKE_INSTALL_SCRIPT_PATH
variableValue: "{{.BuildDir}}"
- !include "{{qt/qtbase}}/call_target_install.yaml"
- type: EnvironmentVariable
variableName: DESTDIR
variableValue: "{{.InstallRoot}}"
- !include "{{qt/qtbase}}/call_target_install.yaml"
- type: EnvironmentVariable
variableName: DESTDIR
variableValue: ""
- type: UploadArtifact
archiveDirectory: "{{.InstallRoot}}/{{.AgentWorkingDir}}"
transferType: UploadModuleBuildArtifact
maxTimeInSeconds: 1200
maxTimeBetweenOutput: 1200
- type: EnvironmentVariable
variableName: COIN_CONFIG_TYPE
variableValue: "Target"
- !include "{{qt/qtbase}}/qmake/get_qmake_location_target.yaml"
- !include "{{qt/qtbase}}/qmake_examples/build_qmake_examples_instructions.yaml"