Use CMAKE_STAGING_PREFIX instead of CMAKE_INSTALL_PREFIX when
cross-compiling. This separates the host path used in staging
prefix and the target path used in the install prefix for the
device. This prevents for example Windows paths from being used
in a device that does not support those. It also tells qmake
not to sysrootify paths when building with it.
Embedded linux and QNX builds are mostly affected and need this
to use correct RPATHs and to unsysrootify qmake. Mobile platforms
(Android and iOS) are not affected since they package binaries
separately. WASM and INTEGRITY are static builds and device paths
are not used.
Cross-compiled auto tests keep staging prefix in RPATHs due to
the behavior implemented in commit 20292250d4
which keeps the QEMU test runs working as before.
Pick-to: 6.3 6.2
Change-Id: If464ccd8cd9318a853df9afcb2aa709fbb2c1837
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
coin_qtbase_build_template_v2.yaml did not exist. The build instructions were directly embedded into
module_config.yaml and did not support repos outside of qtbase, also no cross-compilation.
coin_qtbase_build_template_v2 introduced support for building other repos, and also enabled
build cross-compiling targets like Android and iOS.
A bit later the template gained the ability to build qemu cross-compiling configurations.
The counterpart to qtbase to build other repositories is coin_module_build_template_v2
Test templates
coin_module_test_template_v1 did not exist. The test instructions were directly embedded into
module_config.yaml and did not support repos outside of qtbase, also no cross-compilation.
coin_module_test_template_v2 introduced support for building tests for other repos, and made
sure not to build and run tests on cross-compiling configuration. A bit later the template gained
the ability to build and run tests for qemu cross-compiling configurations.
coin_module_test_template_v3 changed the run test instructions to not ignore the exit code
and thus enforce that tests pass in the CI.