summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-06-28 16:16:04 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-08-15 10:55:48 +0000
commitd64abf8166d362b0fdc34c7f21aa32641063c01b (patch)
tree55ff4ea66da779e7369cfec14ba3a12e8ed3d325
parent1da25fe85a52ea864ab322f027000dd60369b832 (diff)
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 <joerg.bornemann@qt.io>
-rw-r--r--mkspecs/features/qt_example_installs.prf8
1 files changed, 7 insertions, 1 deletions
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()