diff options
author | Craig Scott <craig.scott@qt.io> | 2021-05-24 16:35:39 +1000 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-05-26 13:33:29 +0200 |
commit | d97fd7af2bc5c89a0ad9e5fac080041b78d01179 (patch) | |
tree | b205612447a4498a2da8b3a5804d0335108098b8 /CMakeLists.txt | |
parent | 9b5fadb9f84666f1326281f4fbff7fbe73e9cff6 (diff) |
Build examples in isolated sub-builds using ExternalProject
Examples are intended to show how to build against an installed Qt.
Building them as part of the main build means the way the Qt targets
are defined and created are not representative of an end user's build.
By building them as separate projects using ExternalProject, we can
more closely replicate the intended audience's environment. This
should allow us to catch more problems earlier.
Having examples built as part of the main build also creates problems
with some static builds where a tool built by the main build is needed
during configure time. This happens with other repos like qtdeclarative
but not (currently) with qtbase. Converting the examples in qtbase to
be built using ExternalProject is intended as a demonstrator for how
other repos can do similar. Until other repos are converted, they will
continue to work as they did before, with examples as part of the main
build for non-static builds only.
The new build-externally behavior is only supported for non-prefix
builds with this change. Prefix builds will continue to use the old
non-external method. Support for building examples externally in
prefix builds will be a separate change.
Task-number: QTBUG-90820
Fixes: QTBUG-91068
Change-Id: I2304329940568dbdb7da18d54d5595ea7d8668bc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e2ae4ca29..ba0fd2d106 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,7 +169,4 @@ qt_build_repo_end() if(NOT QT_BUILD_STANDALONE_TESTS AND QT_BUILD_EXAMPLES) add_subdirectory(examples) - if(NOT QT_BUILD_EXAMPLES_BY_DEFAULT) - set_property(DIRECTORY examples PROPERTY EXCLUDE_FROM_ALL TRUE) - endif() endif() |