1 !isEmpty(QTCREATOR_PRI_INCLUDED):error("qtcreator.pri already included")
2 QTCREATOR_PRI_INCLUDED = 1
4 defineReplace(cleanPath) {
6 contains(1, ^/.*):pfx = /
11 equals(seg, ..):out = $$member(out, 0, -2)
12 else:!equals(seg, .):out += $$seg
14 return($$join(out, /, $$pfx))
17 defineReplace(targetPath) {
18 return($$replace(1, /, $$QMAKE_DIR_SEP))
21 defineReplace(qtLibraryName) {
24 CONFIG(debug, debug|release) {
25 !debug_and_release|build_pass {
26 mac:RET = $$member(LIBRARY_NAME, 0)_debug
27 else:win32:RET = $$member(LIBRARY_NAME, 0)d
30 isEmpty(RET):RET = $$LIBRARY_NAME
34 defineTest(minQtVersion) {
38 isEqual(QT_MAJOR_VERSION, $$maj) {
39 isEqual(QT_MINOR_VERSION, $$min) {
40 isEqual(QT_PATCH_VERSION, $$patch) {
43 greaterThan(QT_PATCH_VERSION, $$patch) {
47 greaterThan(QT_MINOR_VERSION, $$min) {
54 # For use in custom compilers which just copy files
56 defineReplace(stripSrcDir) {
58 !contains(1, ^.:.*):1 = $$OUT_PWD/$$1
60 !contains(1, ^/.*):1 = $$OUT_PWD/$$1
62 out = $$cleanPath($$1)
63 out ~= s|^$$re_escape($$PWD/)||$$i_flag
67 isEmpty(TEST):CONFIG(debug, debug|release) {
68 !debug_and_release|build_pass {
73 isEmpty(IDE_LIBRARY_BASENAME) {
74 IDE_LIBRARY_BASENAME = lib
77 DEFINES += IDE_LIBRARY_BASENAME=\\\"$$IDE_LIBRARY_BASENAME\\\"
84 IDE_SOURCE_TREE = $$PWD
85 isEmpty(IDE_BUILD_TREE) {
86 sub_dir = $$_PRO_FILE_PWD_
87 sub_dir ~= s,^$$re_escape($$PWD),,
88 IDE_BUILD_TREE = $$cleanPath($$OUT_PWD)
89 IDE_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,,
91 IDE_APP_PATH = $$IDE_BUILD_TREE/bin
93 IDE_APP_TARGET = "Qt Creator"
94 IDE_LIBRARY_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/PlugIns
95 IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH
96 IDE_LIBEXEC_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
97 IDE_DATA_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
98 IDE_DOC_PATH = $$IDE_DATA_PATH/doc
99 IDE_BIN_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS
100 contains(QT_CONFIG, ppc):CONFIG += ppc x86
104 contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1
105 IDE_APP_TARGET = qtcreator
107 IDE_APP_TARGET = qtcreator
109 IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator
110 IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins
111 IDE_LIBEXEC_PATH = $$IDE_APP_PATH # FIXME
112 IDE_DATA_PATH = $$IDE_BUILD_TREE/share/qtcreator
113 IDE_DOC_PATH = $$IDE_BUILD_TREE/share/doc/qtcreator
114 IDE_BIN_PATH = $$IDE_APP_PATH
115 !isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1
119 $$IDE_SOURCE_TREE/src/libs \
120 $$IDE_SOURCE_TREE/tools
123 $$IDE_SOURCE_TREE/src/libs \
124 $$IDE_SOURCE_TREE/tools
126 LIBS += -L$$IDE_LIBRARY_PATH
128 #DEFINES += QT_NO_CAST_FROM_ASCII
129 DEFINES += QT_NO_CAST_TO_ASCII
130 !macx:DEFINES += QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION
133 CONFIG(debug, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
134 CONFIG(release, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared
136 CONFIG(debug, debug|release):MOC_DIR = $${OUT_PWD}/.moc/debug-shared
137 CONFIG(release, debug|release):MOC_DIR = $${OUT_PWD}/.moc/release-shared
139 RCC_DIR = $${OUT_PWD}/.rcc
140 UI_DIR = $${OUT_PWD}/.uic
144 # Bail out on non-selfcontained libraries. Just a security measure
145 # to prevent checking in code that does not compile on other platforms.
146 QMAKE_LFLAGS += -Wl,--allow-shlib-undefined -Wl,--no-undefined
150 #Don't warn about sprintf, fopen etc being 'unsafe'
151 DEFINES += _CRT_SECURE_NO_WARNINGS
154 # Handle S60 support: default on Windows, conditionally built on other platforms.
155 macx:SUPPORT_QT_S60 = $$(QTCREATOR_WITH_S60)
156 else:SUPPORT_QT_S60=1