OSDN Git Service

L10n: Added missing blank in German translation
[qt-creator-jp/qt-creator-jp.git] / qtcreator.pri
1 !isEmpty(QTCREATOR_PRI_INCLUDED):error("qtcreator.pri already included")
2 QTCREATOR_PRI_INCLUDED = 1
3
4 defineReplace(cleanPath) {
5     win32:1 ~= s|\\\\|/|g
6     contains(1, ^/.*):pfx = /
7     else:pfx =
8     segs = $$split(1, /)
9     out =
10     for(seg, segs) {
11         equals(seg, ..):out = $$member(out, 0, -2)
12         else:!equals(seg, .):out += $$seg
13     }
14     return($$join(out, /, $$pfx))
15 }
16
17 defineReplace(targetPath) {
18     return($$replace(1, /, $$QMAKE_DIR_SEP))
19 }
20
21 defineReplace(qtLibraryName) {
22    unset(LIBRARY_NAME)
23    LIBRARY_NAME = $$1
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
28       }
29    }
30    isEmpty(RET):RET = $$LIBRARY_NAME
31    return($$RET)
32 }
33
34 # For use in custom compilers which just copy files
35 win32:i_flag = i
36 defineReplace(stripSrcDir) {
37     win32 {
38         !contains(1, ^.:.*):1 = $$OUT_PWD/$$1
39     } else {
40         !contains(1, ^/.*):1 = $$OUT_PWD/$$1
41     }
42     out = $$cleanPath($$1)
43     out ~= s|^$$re_escape($$PWD/)||$$i_flag
44     return($$out)
45 }
46
47 isEmpty(TEST):CONFIG(debug, debug|release) {
48     !debug_and_release|build_pass {
49         TEST = 1
50     }
51 }
52
53 isEmpty(IDE_LIBRARY_BASENAME) {
54     IDE_LIBRARY_BASENAME = lib
55 }
56
57 DEFINES += IDE_LIBRARY_BASENAME=\\\"$$IDE_LIBRARY_BASENAME\\\"
58
59 equals(TEST, 1) {
60     QT +=testlib
61     DEFINES += WITH_TESTS
62 }
63
64 IDE_SOURCE_TREE = $$PWD
65 isEmpty(IDE_BUILD_TREE) {
66     sub_dir = $$_PRO_FILE_PWD_
67     sub_dir ~= s,^$$re_escape($$PWD),,
68     IDE_BUILD_TREE = $$cleanPath($$OUT_PWD)
69     IDE_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,,
70 }
71 IDE_APP_PATH = $$IDE_BUILD_TREE/bin
72 macx {
73     IDE_APP_TARGET   = "Qt Creator"
74     IDE_LIBRARY_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/PlugIns
75     IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH
76     IDE_LIBEXEC_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
77     IDE_DATA_PATH    = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
78     IDE_DOC_PATH     = $$IDE_DATA_PATH/doc
79     IDE_BIN_PATH     = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS
80     contains(QT_CONFIG, ppc):CONFIG += ppc x86
81     copydata = 1
82 } else {
83     win32 {
84         contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1
85         IDE_APP_TARGET   = qtcreator
86     } else {
87         IDE_APP_TARGET   = qtcreator
88     }
89     IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator
90     IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH/plugins
91     IDE_LIBEXEC_PATH = $$IDE_APP_PATH # FIXME
92     IDE_DATA_PATH    = $$IDE_BUILD_TREE/share/qtcreator
93     IDE_DOC_PATH     = $$IDE_BUILD_TREE/share/doc/qtcreator
94     IDE_BIN_PATH     = $$IDE_APP_PATH
95     !isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1
96 }
97
98 INCLUDEPATH += \
99     $$IDE_SOURCE_TREE/src/libs \
100     $$IDE_SOURCE_TREE/tools
101
102 DEPENDPATH += \
103     $$IDE_SOURCE_TREE/src/libs \
104     $$IDE_SOURCE_TREE/tools
105
106 LIBS += -L$$IDE_LIBRARY_PATH
107
108 #DEFINES += QT_NO_CAST_FROM_ASCII
109 DEFINES += QT_NO_CAST_TO_ASCII
110 !macx:DEFINES += QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION
111
112 unix {
113     CONFIG(debug, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
114     CONFIG(release, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared
115
116     CONFIG(debug, debug|release):MOC_DIR = $${OUT_PWD}/.moc/debug-shared
117     CONFIG(release, debug|release):MOC_DIR = $${OUT_PWD}/.moc/release-shared
118
119     RCC_DIR = $${OUT_PWD}/.rcc
120     UI_DIR = $${OUT_PWD}/.uic
121 }
122
123 linux-g++-* {
124     # Bail out on non-selfcontained libraries. Just a security measure
125     # to prevent checking in code that does not compile on other platforms.
126     QMAKE_LFLAGS += -Wl,--allow-shlib-undefined -Wl,--no-undefined
127 }
128
129 win32-msvc* { 
130     #Don't warn about sprintf, fopen etc being 'unsafe'
131     DEFINES += _CRT_SECURE_NO_WARNINGS
132 }
133
134 # Handle S60 support: default on Windows, conditionally built on other platforms.
135 macx:SUPPORT_QT_S60 = $$(QTCREATOR_WITH_S60)
136 else:SUPPORT_QT_S60=1