source: trunk/mkspecs/features/qt.prf@ 827

Last change on this file since 827 was 769, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

File size: 8.4 KB
Line 
1CONFIG *= moc thread
2
3#handle defines
4win32 {
5 qt_static:DEFINES += QT_NODLL
6 !contains(DEFINES, QT_NODLL) {
7 QT_ENV_DLL = $$(QT_DLL)
8 QT_ENV_NO_DLL = $$(QT_NODLL)
9 isEmpty(QT_ENV_NO_DLL) {
10 shared|!isEmpty(QT_ENV_DLL):DEFINES += QT_DLL
11 }
12 contains(DEFINES, QT_MAKEDLL)|contains(DEFINES, QT_DLL):QMAKE_QT_DLL = 1
13 }
14}
15CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG
16no_keywords:DEFINES += QT_NO_KEYWORDS
17plugin { #Qt plugins
18 static:DEFINES += QT_STATICPLUGIN
19 DEFINES += QT_PLUGIN
20
21 # Triggers both on Qt being configured with -arch boundschecker,
22 # and if you qmake CONFIG+=boundchecker on your plugin project
23 boundschecker|contains(QT_CONFIG,boundschecker) {
24 # This option is added for plugins when Qt is configured for Boundschecker,
25 # since we want Boundschecker to not instrument the qt_plugin_query_verification_data
26 # function, as we call that function without the plugin's dependent DLLs, thus
27 # Boundscheckers instrumentation will fail. The function only returns a const char *,
28 # so no instrumentation is really needed on that function anyways.
29 QMAKE_CFLAGS += /nmignore:*:qt_plugin_query_verification_data
30 QMAKE_CXXFLAGS += /nmignore:*:qt_plugin_query_verification_data
31 }
32}
33
34#handle modules
35for(mod,$$list($$files($$[QMAKE_MKSPECS]/modules/qt_*.pri))):include($$mod)
36
37#handle includes
38INCLUDEPATH = $$QMAKE_INCDIR_QT $$INCLUDEPATH #prepending prevents us from picking up "stale" includes
39win32:INCLUDEPATH += $$QMAKE_INCDIR_QT/ActiveQt
40
41# As order does matter for static libs, we reorder the QT variable here
42TMPLIBS = declarative webkit phonon multimedia dbus testlib script scripttools svg qt3support sql xmlpatterns xml egl opengl openvg gui network core
43for(QTLIB, $$list($$TMPLIBS)) {
44 contains(QT, $$QTLIB): QT_ORDERED += $$QTLIB
45}
46
47QT_UNKNOWN = $$QT
48QT_UNKNOWN -= $$QT_ORDERED
49QT = $$QT_ORDERED
50for(QTLIB, $$list($$QT_UNKNOWN)) {
51 !contains(TMPLIBS, $$QTLIB):message("Warning: unknown QT: $$QTLIB")
52}
53
54QT_PLUGIN_VERIFY = QTPLUGIN DEPLOYMENT_PLUGIN
55for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) {
56 for(QTPLUG, $$list($$lower($$unique($$QT_CURRENT_VERIFY)))) {
57 qplugin_style =
58 !qt_debug:!qt_release {
59 CONFIG(debug, debug|release):qplugin_style = debug
60 else:qplugin_style = release
61 } else:CONFIG(qt_debug, qt_debug|qt_release) {
62 qplugin_style = debug
63 } else {
64 qplugin_style = release
65 }
66
67 # Check if the plugin is known to Qt. We can use this to determine
68 # the plugin path. Unknown plugins must rely on the default link path.
69 ACCESSIBLEPLUGINS = qtaccessiblewidgets qtaccessiblecompatwidgets
70 CODECPLUGINS = qcncodecs qjpcodecs qkrcodecs qtwcodecs
71 DECORATIONPLUGINS = qdecorationdefault qdecorationwindows
72 GFXDRIVERPLUGINS = qgfxvnc qscreenvfb qgfxsnap qgfxvga16 qgfxmatrox qgfxvoodoo qgfxtransformed qgfxshadowfb
73 IMAGEPLUGINS = qgif qmng qjpeg qsvg
74 INPUTPLUGINS = qimsw-multi
75 MOUSEDRIVERPLUGINS = qtslibmousehandler
76 SQLPLUGINS = qsqldb2 qsqloci qsqltds qsqlodbc qsqlpsql qsqlibase qsqlmysql qsqlite2 qsqlite
77 PHONONPLUGINS = phonon_waveout phonon_ds9
78
79 ALLQTPLUGINS = $$ACCESSIBLEPLUGINS $$CODECPLUGINS $$DECORATIONPLUGINS $$GFXDRIVERPLUGINS $$IMAGEPLUGINS $$INPUTPLUGINS $$MOUSEDRIVERPLUGINS $$SQLPLUGINS $$PHONONPLUGINS
80
81 QT_PLUGINPATH =
82 contains(ALLQTPLUGINS, $$QTPLUG) {
83 # Determine the plugin path
84 contains(ACCESSIBLEPLUGINS, $$QTPLUG): QT_PLUGINPATH = accessible
85 contains(CODECPLUGINS, $$QTPLUG): QT_PLUGINPATH = codecs
86 contains(DECORATIONPLUGINS, $$QTPLUG): QT_PLUGINPATH = decorations
87 contains(GFXDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = gfxdrivers
88 contains(IMAGEPLUGINS, $$QTPLUG): QT_PLUGINPATH = imageformats
89 contains(INPUTPLUGINS, $$QTPLUG): QT_PLUGINPATH = inputmethods
90 contains(MOUSEDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = mousedrivers
91 contains(SQLPLUGINS, $$QTPLUG): QT_PLUGINPATH = sqldrivers
92 contains(PHONONPLUGINS, $$QTPLUG): QT_PLUGINPATH = phonon_backend
93 }
94
95 # Generate the plugin linker line
96 target_qt:isEqual(TARGET, QTPLUG) {
97 warning($$TARGET cannot have a QTPLUGIN of $$QTPLUG)
98 } else {
99 QT_LINKAGE = -l$${QTPLUG}
100 win32|os2 {
101 CONFIG(debug, debug|release):QT_LINKAGE = -l$${QTPLUG}d
102 } else:mac {
103 isEqual(qplugin_style, debug):QT_LINKAGE = -l$${QTPLUG}_debug
104 }
105 }
106
107 # Only link against plugin in static builds
108 isEqual(QT_CURRENT_VERIFY, QTPLUGIN): {
109 !isEmpty(QT_PLUGINPATH): LIBS *= -L$$[QT_INSTALL_PLUGINS]/$$QT_PLUGINPATH
110 LIBS += $$QT_LINKAGE
111 # if the plugin is linked statically there is no need to deploy it
112 DEPLOYMENT_PLUGIN -= $$QT_CURRENT_VERIFY
113 }
114 isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:wince*: {
115 QT_ITEM =
116 CONFIG(debug, debug|release): QT_ITEM = $${QTPLUG}d4.dll
117 else: QT_ITEM = $${QTPLUG}4.dll
118
119 eval(qt_additional_plugin_$${QTPLUG}.sources = $$[QT_INSTALL_PLUGINS]/$${QT_PLUGINPATH}/$${QT_ITEM})
120 eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH})
121
122 DEPLOYMENT *= qt_additional_plugin_$${QTPLUG}
123 }
124 isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:symbian: {
125 QT_ITEM = $${QTPLUG}.dll
126
127 eval(qt_additional_plugin_$${QTPLUG}.sources = $${QT_ITEM})
128 eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH})
129
130 DEPLOYMENT *= qt_additional_plugin_$${QTPLUG}
131 }
132 }
133}
134#specific module settings
135!isEmpty(QT_BUILD_TREE):QMAKE_LIBDIR = $$QT_BUILD_TREE/lib $$QMAKE_LIBDIR #as above, prepending prevents us from picking up "stale" libs
136QMAKE_LIBDIR += $$QMAKE_LIBDIR_QT
137for(QTLIB, $$list($$lower($$unique(QT)))) {
138 unset(qlib_style)
139 !qt_debug:!qt_release {
140 CONFIG(debug, debug|release):qlib_style = debug
141 else:qlib_style = release
142 } else:CONFIG(qt_debug, qt_debug|qt_release) {
143 qlib_style = debug
144 } else {
145 qlib_style = release
146 }
147
148 unset(qlib)
149 isEqual(QTLIB, gui):qlib = QtGui
150 else:isEqual(QTLIB, network):qlib = QtNetwork
151 else:isEqual(QTLIB, xml):qlib = QtXml
152 else:isEqual(QTLIB, xmlpatterns):qlib = QtXmlPatterns
153 else:isEqual(QTLIB, opengl):qlib = QtOpenGL
154 else:isEqual(QTLIB, openvg):qlib = QtOpenVG
155 else:isEqual(QTLIB, sql):qlib = QtSql
156 else:isEqual(QTLIB, core):qlib = QtCore
157 else:isEqual(QTLIB, canvas):qlib = QtCanvas
158 else:isEqual(QTLIB, qt3support):qlib = Qt3Support
159 else:isEqual(QTLIB, svg):qlib = QtSvg
160 else:isEqual(QTLIB, script):qlib = QtScript
161 else:isEqual(QTLIB, scripttools):qlib = QtScriptTools
162 else:isEqual(QTLIB, testlib):qlib = QtTest
163 else:isEqual(QTLIB, dbus):qlib = QtDBus
164 else:isEqual(QTLIB, phonon) {
165 qlib = phonon
166 INCLUDEPATH += $$QMAKE_INCDIR_QT/phonon_compat
167
168 # The Helix backend requires this. Since we can't let a plugin set it,
169 # we bump the values for all Symbian Phonon plugins.
170 symbian:isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x040000 0x1600000
171
172 } else:isEqual(QTLIB, webkit) {
173 qlib = QtWebKit
174 aix-xlc {
175 # Flags recommended by IBM when using WebKit
176 QMAKE_LFLAGS -= -bmaxdata:0x80000000
177 QMAKE_LFLAGS += -bmaxdata:0xD0000000/dsa
178 }
179 } else:isEqual(QTLIB, declarative):qlib = QtDeclarative
180 else:isEqual(QTLIB, multimedia):qlib = QtMultimedia
181 else:message("Unknown QT: $$QTLIB"):qlib =
182 !isEmpty(qlib) {
183 target_qt:isEqual(TARGET, qlib) {
184 warning($$TARGET cannot have a QT of $$QTLIB)
185 } else {
186 DEFINES *= $$upper(QT_$${QTLIB}_LIB)
187 isEqual(QTLIB, opengl):CONFIG += opengl
188 isEqual(QTLIB, openvg):CONFIG += openvg
189 isEqual(QTLIB, qt3support):DEFINES *= QT3_SUPPORT
190 isEqual(QTLIB, testlib):CONFIG += console
191 isEqual(QTLIB, dbus):CONFIG += dbusadaptors dbusinterfaces
192
193 qtAddLibrary($$qlib)
194 }
195 }
196}
197
198qt_compat {
199 !qt_compat_no_warning:QTDIR_build:warning(***USE of COMPAT inside of QTDIR!**) #just for us
200 INCLUDEPATH *= $$QMAKE_INCDIR_QT/Qt
201 DEFINES *= QT_COMPAT
202}
203
204wince*:static:gui {
205 QTLIB += qmenu_wce.res
206}
207
208!isEmpty(QT_NAMESPACE):DEFINES *= QT_NAMESPACE=$$QT_NAMESPACE
209mac {
210 !isEmpty(QT_NAMESPACE_MAC_CRC):DEFINES *= QT_NAMESPACE_MAC_CRC=$$QT_NAMESPACE_MAC_CRC
211}
Note: See TracBrowser for help on using the repository browser.