summaryrefslogtreecommitdiff
path: root/qtcreator.pri
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-04-17 11:26:03 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-04-20 16:51:10 +0200
commit13f04d84304fe7a7530fbd232f24fa3a3c0ef9fe (patch)
treec29791d38cf4c1379744128aec6b192cbd458aab /qtcreator.pri
parent29b437e42f43820f66dfb622ff8129d9f3231f0c (diff)
downloadqt-creator-13f04d84304fe7a7530fbd232f24fa3a3c0ef9fe.tar.gz
revamp build system
now bin and share are not pegged to linking the executable any more, but are proper subdirs targets of their own. unforturnately, qmake is a bit tenacious, so we hack around a bit. :) more or less in passing by, i removed some superfluous trailing slashes and added path normalization as well.
Diffstat (limited to 'qtcreator.pri')
-rw-r--r--qtcreator.pri89
1 files changed, 89 insertions, 0 deletions
diff --git a/qtcreator.pri b/qtcreator.pri
new file mode 100644
index 0000000000..0166ab6c96
--- /dev/null
+++ b/qtcreator.pri
@@ -0,0 +1,89 @@
+IDE_SOURCE_TREE = $$PWD
+
+defineReplace(cleanPath) {
+ win32:1 ~= s|\\\\|/|g
+ contains(1, ^/.*):pfx = /
+ else:pfx =
+ segs = $$split(1, /)
+ out =
+ for(seg, segs) {
+ equals(seg, ..):out = $$member(out, 0, -2)
+ else:!equals(seg, .):out += $$seg
+ }
+ return($$join(out, /, $$pfx))
+}
+
+defineReplace(targetPath) {
+ win32:1 ~= s|/|\|g
+ return($$1)
+}
+
+isEmpty(TEST):CONFIG(debug, debug|release) {
+ !debug_and_release|build_pass {
+ TEST = 1
+ }
+}
+
+linux-*-64 {
+ IDE_LIBRARY_BASENAME = lib64
+} else {
+ IDE_LIBRARY_BASENAME = lib
+}
+
+equals(TEST, 1) {
+ QT +=testlib
+ 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)
+macx {
+ IDE_APP_TARGET = QtCreator
+ IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/bin/$${IDE_APP_TARGET}.app/Contents/PlugIns
+ IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH
+ IDE_DATA_PATH = $$IDE_BUILD_TREE/bin/$${IDE_APP_TARGET}.app/Contents/Resources
+ contains(QT_CONFIG, ppc):CONFIG += ppc x86
+} else {
+ win32 {
+ IDE_APP_TARGET = qtcreator
+ } else {
+ IDE_APP_WRAPPER = qtcreator
+ IDE_APP_TARGET = qtcreator.bin
+ }
+ IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator
+ IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins
+ IDE_DATA_PATH = $$IDE_BUILD_TREE/share/qtcreator
+}
+IDE_APP_PATH = $$IDE_BUILD_TREE/bin
+
+INCLUDEPATH += \
+ $$IDE_SOURCE_TREE/src/libs \
+ $$IDE_SOURCE_TREE/tools
+
+DEPENDPATH += \
+ $$IDE_SOURCE_TREE/src/libs \
+ $$IDE_SOURCE_TREE/tools
+
+LIBS += -L$$IDE_LIBRARY_PATH
+
+# DEFINES += QT_NO_CAST_FROM_ASCII
+DEFINES += QT_NO_CAST_TO_ASCII
+
+unix {
+ debug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
+ release:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared
+
+ debug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared
+ release:MOC_DIR = $${OUT_PWD}/.moc/release-shared
+
+ RCC_DIR = $${OUT_PWD}/.rcc
+ UI_DIR = $${OUT_PWD}/.uic
+}
+
+linux-g++-* {
+ # Bail out on non-selfcontained libraries. Just a security measure
+ # to prevent checking in code that does not compile on other platforms.
+ QMAKE_LFLAGS += -Wl,--allow-shlib-undefined -Wl,--no-undefined
+}