diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2024-03-06 17:43:04 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2024-03-20 09:57:15 +0100 |
commit | bc227037b89bc9d07e1122bd71d1acdc9bf98dd3 (patch) | |
tree | f334fbd8910872a583d03bb0adb7a66307f1db01 /cmake | |
parent | 7b4c6ff81d047e7f5b43fd3a2a70840a75bd05b9 (diff) |
coin: Add instructions to build standalone examples
If a qt5.git configuration is marked with the StandaloneTests feature,
tell CMake not to build the examples in-tree, and instead use
qt-internal-configure-examples to build the examples out-of-tree.
This brings a couple of improvements:
- higher chance of building examples as ExternalProjects without
issues
- ability to use deployment api in examples, without installing the
examples into a main install prefix
The new coin instructions files use a copy of the standalone tests
instructions as a base.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: If89e6da0b327a38b9c2738f58aa1b5b5fb9fda37
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit d644f2e02ce36520b4d101ea03fbbcf1b72e7e6f)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtBuildOptionsHelpers.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/QtBuildOptionsHelpers.cmake b/cmake/QtBuildOptionsHelpers.cmake index 484fa6296e..81166a7f26 100644 --- a/cmake/QtBuildOptionsHelpers.cmake +++ b/cmake/QtBuildOptionsHelpers.cmake @@ -306,6 +306,13 @@ macro(qt_internal_setup_build_examples) option(QT_INSTALL_EXAMPLES_SOURCES_BY_DEFAULT "Install example sources as part of the default 'install' target" ON) + # We need a way to force disable building in-tree examples in the CI, so that we instead build + # standalone examples. Because the Coin yaml instructions don't allow us to remove + # -make examples from from the configure args, we instead read a variable that only Coin sets. + if(QT_INTERNAL_CI_NO_BUILD_IN_TREE_EXAMPLES) + set(QT_BUILD_EXAMPLES OFF CACHE BOOL "Build Qt examples" FORCE) + endif() + if(QT_BUILD_STANDALONE_EXAMPLES) # BuildInternals might have set it to OFF on initial configuration. So force it to ON when # building standalone examples. |