From d64abf8166d362b0fdc34c7f21aa32641063c01b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 28 Jun 2017 16:16:04 +0200 Subject: refuse to build examples inside the qt source tree stand-alone doing so is somewhat likely to cause follow-up issues, as it turns the source tree into a build tree as a side effect. note that this change does not affect building examples inside an install tree, even if doing that is still ugly. Change-Id: I386bf2ab959269f55553c70b7551dd9afec2bcba Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_example_installs.prf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf index 21f4e8b271..668669e4cd 100644 --- a/mkspecs/features/qt_example_installs.prf +++ b/mkspecs/features/qt_example_installs.prf @@ -26,9 +26,15 @@ defineTest(addInstallFiles) { } probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) -isEmpty(probase)|contains(probase, ^\\..*)|isEmpty(_QMAKE_CACHE_): \ +isEmpty(probase)|contains(probase, ^\\..*): \ return() +isEmpty(_QMAKE_CACHE_) { + !equals(OUT_PWD, $$_PRO_FILE_PWD_): \ + return() + error("You cannot build examples inside the Qt source tree, except as part of a proper Qt build.") +} + contains(TEMPLATE, "vc.*"): \ return() -- cgit v1.2.3