summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/default_post.prf
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-10-07 17:55:45 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-11 18:47:27 +0200
commit0e96e47debd1d8c48d1d23fd51c9ee05f61c80e0 (patch)
tree118082426ba46aab1f6a715fbcc4a423e9c11398 /mkspecs/features/default_post.prf
parent2b8e571f8458a533d1b902fff5a812db427b7da0 (diff)
qmake: Centralize TARGET sanitization in default_post.prf
Shared between UNIX and Win generators, and allows prfs after default_post to rely on sane TARGET and DESTDIR values. This allows us to clean up the DESTDIR logic in testcase.prf, which was completely busted. Doing the two in separate commits is unfortunately not possible as the old testcase.prf logic was so broken it would barf if only looked at. Change-Id: Ibf21216195c760ee46ae679c162b207b77a9d813 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'mkspecs/features/default_post.prf')
-rw-r--r--mkspecs/features/default_post.prf12
1 files changed, 12 insertions, 0 deletions
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index c756455dd2..4501b2a568 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -6,6 +6,18 @@ contains(TEMPLATE, ".*(lib|app)"):CONFIG += have_target
load(resolve_config)
+# If the TARGET looks like a path, split it into DESTDIR and the resulting TARGET
+target_dir_part = $$dirname(TARGET)
+!isEmpty(target_dir_part) {
+ isEmpty(DESTDIR): \
+ DESTDIR = $$target_dir_part
+ else: \
+ DESTDIR = $$DESTDIR/$$target_dir_part
+
+ TARGET = $$basename(TARGET)
+ DESTDIR = $$clean_path($$DESTDIR)
+}
+
QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
!isEmpty(QT_BREAKPAD_ROOT_PATH): \ # quick test first whether requested ...
!static:release:have_target: \ # is it applicable?