aboutsummaryrefslogtreecommitdiffstats
path: root/qtcreator.pri
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-05-06 16:02:06 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-05-06 20:25:20 +0200
commit97ffee6bdd8cc7cbb4eb709057a3973773222795 (patch)
tree4cb446e8bbae4d53a463e5248405900efbb5df73 /qtcreator.pri
parent905f3d6c30dbab2bd97bd323fec2fe1f218f42fb (diff)
automate setting IDE_BUILD_TREE
Diffstat (limited to 'qtcreator.pri')
-rw-r--r--qtcreator.pri11
1 files changed, 5 insertions, 6 deletions
diff --git a/qtcreator.pri b/qtcreator.pri
index 0166ab6c969..abd82b2cb4e 100644
--- a/qtcreator.pri
+++ b/qtcreator.pri
@@ -1,5 +1,3 @@
-IDE_SOURCE_TREE = $$PWD
-
defineReplace(cleanPath) {
win32:1 ~= s|\\\\|/|g
contains(1, ^/.*):pfx = /
@@ -35,10 +33,11 @@ equals(TEST, 1) {
DEFINES += WITH_TESTS
}
-isEmpty(IDE_BUILD_TREE) {
- error("qtcreator.pri: including file must define IDE_BUILD_TREE (probably a relative path)")
-}
-IDE_BUILD_TREE = $$cleanPath($$IDE_BUILD_TREE)
+IDE_SOURCE_TREE = $$PWD
+sub_dir = $$_PRO_FILE_PWD_
+sub_dir ~= s,^$$re_escape($$PWD),,
+IDE_BUILD_TREE = $$cleanPath($$OUT_PWD)
+IDE_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,,
macx {
IDE_APP_TARGET = QtCreator
IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/bin/$${IDE_APP_TARGET}.app/Contents/PlugIns