From d1c825ae8cf5eca58f99b49913ac106ee9104f9c Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 3 Feb 2022 12:06:20 +0100 Subject: CMake: Temporarily disable building external examples in prefix builds There are issues when building examples as external projects in the CI in child repos like qtsvg. QEMU configurations fail to find some CMake Config files, Windows configs fail to find libraries. Until these issues are fixed, build examples in-tree (without using external projects) like we did before. Temporarily disables 98c89c8cc1c5ceb4bfbb5f5ed6c96ecdbab99afa Pick-to: 6.2 6.3 Task-number: QTBUG-90820 Task-number: QTBUG-96232 Change-Id: Ia4b39812b27cfde5f5a103fd39cc1cb032842643 Reviewed-by: Fabian Kosmale --- cmake/QtSetup.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cmake/QtSetup.cmake') diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake index a8c9e63352..ee42e9e785 100644 --- a/cmake/QtSetup.cmake +++ b/cmake/QtSetup.cmake @@ -176,7 +176,15 @@ enable_testing() option(QT_BUILD_EXAMPLES "Build Qt examples" OFF) option(QT_BUILD_EXAMPLES_BY_DEFAULT "Should examples be built as part of the default 'all' target." ON) -option(QT_BUILD_EXAMPLES_AS_EXTERNAL "Should examples be built as ExternalProjects." ON) +# FIXME: Support prefix builds as well QTBUG-96232 +if(QT_WILL_INSTALL) + set(_qt_build_examples_as_external OFF) +else() + set(_qt_build_examples_as_external ON) +endif() +option(QT_BUILD_EXAMPLES_AS_EXTERNAL "Should examples be built as ExternalProjects." + ${_qt_build_examples_as_external}) +unset(_qt_build_examples_as_external) option(QT_BUILD_MANUAL_TESTS "Build Qt manual tests" OFF) option(QT_BUILD_MINIMAL_STATIC_TESTS "Build minimal subset of tests for static Qt builds" OFF) -- cgit v1.2.3