qt5base-lts/coin/instructions/qmake_examples/build_qmake_examples_instructions.yaml
Alexandru Croitor 24f12d0cef CMake: Build examples with qmake against a CMake built Qt
We want to remove the Qt .pro files for projects, except examples,
because examples are still meant to build with qmake.

To not lose coverage on examples built with qmake, add instructions that
will build the qtrepo/examples folder with qmake when the CMake
configuration has -DQT_BUILD_EXAMPLES=ON.

This means that such configurations will build examples both with CMake
and qmake.

Aside from making sure that our examples will still build with qmake, it
will gives us some some coverage that a CMake-built qmake works
correctly.

Implementation-wise, add new instructions files that can call qmake and
make depending on configuration and target type.

Pick-to: 6.0
Fixes: QTBUG-85986
Change-Id: Ie8f4cbcda03c94da2aef455e32f48dad41a4bdb0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-04 15:39:32 +01:00

24 lines
868 B
YAML

type: Group
instructions:
# Only enable building examples if -DQT_BUILD_EXAMPLES=ON was passed to the CMake config in some
# form. The variable to check unfortunately depends on host vs target, and qtbase vs non-qtbase.
- type: Group
instructions:
- !include "{{qt/qtbase}}/qmake_examples/build_qmake_examples_inner_instructions.yaml"
enable_if:
condition: or
conditions:
# qtbase host case
- condition: runtime
env_var: CONFIGURE_ARGS
contains_value: "QT_BUILD_EXAMPLES=ON"
# qtbase target case
- condition: runtime
env_var: TARGET_CONFIGURE_ARGS
contains_value: "QT_BUILD_EXAMPLES=ON"
# non-qtbase host case
# non-qtbase target case
- condition: runtime
env_var: COIN_CMAKE_ARGS
contains_value: "QT_BUILD_EXAMPLES=ON"