summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-01 01:01:01 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-01 01:01:02 +0100
commit4b0af2cdbf61572b22ea6b8aa17fc9f52c71ac4b (patch)
tree60fb25a6772f5ac2d26af005b9888ff09c08a6c1 /mkspecs/features
parentcff492fed1d98f45c4c1f4011f1451120c0d1c23 (diff)
parent36e277e91732d6d75fb6d9cb691fe9c0f83f6178 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/qt_example_installs.prf10
1 files changed, 6 insertions, 4 deletions
diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf
index 43b58817fe..72b47bce27 100644
--- a/mkspecs/features/qt_example_installs.prf
+++ b/mkspecs/features/qt_example_installs.prf
@@ -25,14 +25,16 @@ defineTest(addInstallFiles) {
export($$1)
}
-probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples)
+moduleRoot = $$dirname(_QMAKE_CONF_)
+probase = $$relative_path($$_PRO_FILE_PWD_, $$moduleRoot/examples)
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.")
+ moduleRootRelativeToBuildDir = $$relative_path($$moduleRoot, $$OUT_PWD)
+ # Check if OUT_PWD is inside module root
+ equals(moduleRootRelativeToBuildDir, .)|contains(moduleRootRelativeToBuildDir, \(\.\./\)+\(\.\.\)?): \
+ error("You cannot build examples inside the Qt source tree, except as part of a proper Qt build.")
}
contains(TEMPLATE, "vc.*"): \