2009-04-17 11:26:03 +02:00
|
|
|
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) {
|
2009-11-24 12:40:14 +01:00
|
|
|
return($$replace(1, /, $$QMAKE_DIR_SEP))
|
2009-04-17 11:26:03 +02:00
|
|
|
}
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2009-05-06 17:41:38 +02:00
|
|
|
# For use in custom compilers which just copy files
|
|
|
|
win32:i_flag = i
|
|
|
|
defineReplace(stripSrcDir) {
|
|
|
|
win32 {
|
|
|
|
!contains(1, ^.:.*):1 = $$OUT_PWD/$$1
|
|
|
|
} else {
|
|
|
|
!contains(1, ^/.*):1 = $$OUT_PWD/$$1
|
|
|
|
}
|
|
|
|
out = $$cleanPath($$1)
|
|
|
|
out ~= s|^$$re_escape($$PWD/)||$$i_flag
|
|
|
|
return($$out)
|
|
|
|
}
|
|
|
|
|
2008-12-08 17:06:45 +01:00
|
|
|
isEmpty(TEST):CONFIG(debug, debug|release) {
|
|
|
|
!debug_and_release|build_pass {
|
2008-12-02 12:01:29 +01:00
|
|
|
TEST = 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-05-12 16:18:38 +02:00
|
|
|
isEmpty(IDE_LIBRARY_BASENAME) {
|
2009-03-23 15:36:15 +01:00
|
|
|
IDE_LIBRARY_BASENAME = lib
|
|
|
|
}
|
|
|
|
|
2009-05-12 16:18:38 +02:00
|
|
|
DEFINES += IDE_LIBRARY_BASENAME=\\\"$$IDE_LIBRARY_BASENAME\\\"
|
|
|
|
|
2008-12-08 17:06:45 +01:00
|
|
|
equals(TEST, 1) {
|
|
|
|
QT +=testlib
|
|
|
|
DEFINES += WITH_TESTS
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-05-06 16:02:06 +02:00
|
|
|
IDE_SOURCE_TREE = $$PWD
|
2009-05-11 12:37:05 +02:00
|
|
|
isEmpty(IDE_BUILD_TREE) {
|
|
|
|
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)$,,
|
|
|
|
}
|
2009-05-06 16:18:05 +02:00
|
|
|
IDE_APP_PATH = $$IDE_BUILD_TREE/bin
|
2008-12-02 12:01:29 +01:00
|
|
|
macx {
|
2009-09-14 17:42:08 +02:00
|
|
|
IDE_APP_TARGET = "Qt Creator"
|
2009-05-06 16:18:05 +02:00
|
|
|
IDE_LIBRARY_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/PlugIns
|
2009-04-17 11:26:03 +02:00
|
|
|
IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH
|
2009-05-06 16:18:05 +02:00
|
|
|
IDE_LIBEXEC_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
|
|
|
|
IDE_DATA_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
|
2009-11-02 21:36:26 +01:00
|
|
|
IDE_DOC_PATH = $$IDE_DATA_PATH/doc
|
2008-12-02 12:01:29 +01:00
|
|
|
contains(QT_CONFIG, ppc):CONFIG += ppc x86
|
2009-05-06 16:39:07 +02:00
|
|
|
copydata = 1
|
2008-12-02 12:01:29 +01:00
|
|
|
} else {
|
2009-04-17 11:26:03 +02:00
|
|
|
win32 {
|
2009-05-06 17:41:38 +02:00
|
|
|
contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1
|
2009-04-17 11:26:03 +02:00
|
|
|
IDE_APP_TARGET = qtcreator
|
|
|
|
} else {
|
|
|
|
IDE_APP_WRAPPER = qtcreator
|
|
|
|
IDE_APP_TARGET = qtcreator.bin
|
|
|
|
}
|
2009-03-23 15:36:15 +01:00
|
|
|
IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator
|
2009-04-17 11:26:03 +02:00
|
|
|
IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins
|
2009-05-06 16:18:05 +02:00
|
|
|
IDE_LIBEXEC_PATH = $$IDE_APP_PATH # FIXME
|
2009-04-17 11:26:03 +02:00
|
|
|
IDE_DATA_PATH = $$IDE_BUILD_TREE/share/qtcreator
|
2009-11-02 21:36:26 +01:00
|
|
|
IDE_DOC_PATH = $$IDE_BUILD_TREE/share/doc/qtcreator
|
2009-05-06 16:39:07 +02:00
|
|
|
!isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
INCLUDEPATH += \
|
|
|
|
$$IDE_SOURCE_TREE/src/libs \
|
2009-04-17 11:26:03 +02:00
|
|
|
$$IDE_SOURCE_TREE/tools
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
DEPENDPATH += \
|
|
|
|
$$IDE_SOURCE_TREE/src/libs \
|
2009-04-17 11:26:03 +02:00
|
|
|
$$IDE_SOURCE_TREE/tools
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
LIBS += -L$$IDE_LIBRARY_PATH
|
2008-12-03 10:27:12 +01:00
|
|
|
|
2009-02-19 11:31:12 +01:00
|
|
|
# DEFINES += QT_NO_CAST_FROM_ASCII
|
|
|
|
DEFINES += QT_NO_CAST_TO_ASCII
|
2010-02-04 14:58:33 +01:00
|
|
|
DEFINES += QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION
|
2009-02-19 11:31:12 +01:00
|
|
|
|
2008-12-03 10:27:12 +01:00
|
|
|
unix {
|
2009-10-23 12:37:53 +02:00
|
|
|
CONFIG(debug, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
|
|
|
|
CONFIG(release, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared
|
2008-12-03 10:27:12 +01:00
|
|
|
|
2009-10-23 12:37:53 +02:00
|
|
|
CONFIG(debug, debug|release):MOC_DIR = $${OUT_PWD}/.moc/debug-shared
|
|
|
|
CONFIG(release, debug|release):MOC_DIR = $${OUT_PWD}/.moc/release-shared
|
2008-12-03 10:27:12 +01:00
|
|
|
|
2009-04-17 11:26:03 +02:00
|
|
|
RCC_DIR = $${OUT_PWD}/.rcc
|
|
|
|
UI_DIR = $${OUT_PWD}/.uic
|
2008-12-03 10:27:12 +01:00
|
|
|
}
|
2009-03-12 15:49:09 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
2009-10-06 14:43:05 +02:00
|
|
|
|
|
|
|
# Handle S60 support: default on Windows, conditionally built on other platforms.
|
|
|
|
win32:SUPPORT_QT_S60=1
|
|
|
|
else:SUPPORT_QT_S60 = $$(QTCREATOR_WITH_S60)
|