summaryrefslogtreecommitdiffstats
path: root/cmake/QtBuildInternals
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-05-31 13:52:19 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2021-06-15 12:51:49 +0200
commitdab8f64b6d5d4241b678d0227355858071376496 (patch)
tree048a129dc8c3516d31301529f8aeae879648f387 /cmake/QtBuildInternals
parent0f9695e6da7b40d684d20d55144d020004c2e9ea (diff)
CMake: Be precise about EXTERNAL_BUILD check when building examples
This change allows temporarily removing the EXTERNAL_BUILD option in a qt repo examples project to check how the examples behave in a non-external project build, without forcing the developer to use a prefix build. Useful to compare behavior until we've ported over prefix builds to use EXTERNAL_BUILD. Amends d97fd7af2bc5c89a0ad9e5fac080041b78d01179 Change-Id: I29b834bb5f00e1e93966caae6f816faedba76b76 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtBuildInternals')
-rw-r--r--cmake/QtBuildInternals/QtBuildInternalsConfig.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
index ad0025da7c..1427f5a5fc 100644
--- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
+++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
@@ -678,6 +678,7 @@ macro(qt_examples_build_begin)
# but that should rarely be necessary.
set(QT_EXAMPLE_DEPENDENCIES qt_plugins ${qt_repo_targets_name} ${arg_DEPENDS})
set(QT_EXAMPLE_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+ set(QT_IS_EXTERNAL_EXAMPLES_BUILD TRUE)
string(TOLOWER ${PROJECT_NAME} project_name_lower)
if(NOT TARGET examples)
@@ -769,7 +770,8 @@ endmacro()
function(qt_internal_add_example subdir)
# FIXME: Support building examples externally for prefix builds as well.
- if(QT_WILL_INSTALL)
+
+ if(NOT QT_IS_EXTERNAL_EXAMPLES_BUILD)
# Use old non-external approach
add_subdirectory(${subdir} ${ARGN})
return()