author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 02 Feb 2010 00:43:10 +0200 | |
changeset 3 | 41300fa6a67c |
parent 0 | 1918ee327afb |
child 4 | 3b1da2848fc7 |
permissions | -rw-r--r-- |
0 | 1 |
CONFIG *= moc thread |
2 |
||
3 |
#handle defines |
|
4 |
win32 { |
|
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 |
} |
|
15 |
CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG |
|
16 |
no_keywords:DEFINES += QT_NO_KEYWORDS |
|
17 |
plugin { #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 includes |
|
35 |
INCLUDEPATH = $$QMAKE_INCDIR_QT $$INCLUDEPATH #prepending prevents us from picking up "stale" includes |
|
36 |
win32:INCLUDEPATH += $$QMAKE_INCDIR_QT/ActiveQt |
|
37 |
||
38 |
# As order does matter for static libs, we reorder the QT variable here |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
39 |
TMPLIBS = declarative webkit phonon multimedia dbus testlib script scripttools svg qt3support sql xmlpatterns xml egl opengl openvg gui network core |
0 | 40 |
for(QTLIB, $$list($$TMPLIBS)) { |
41 |
contains(QT, $$QTLIB): QT_ORDERED += $$QTLIB |
|
42 |
} |
|
43 |
||
44 |
QT_UNKNOWN = $$QT |
|
45 |
QT_UNKNOWN -= $$QT_ORDERED |
|
46 |
QT = $$QT_ORDERED |
|
47 |
for(QTLIB, $$list($$QT_UNKNOWN)) { |
|
48 |
!contains(TMPLIBS, $$QTLIB):message("Warning: unknown QT: $$QTLIB") |
|
49 |
} |
|
50 |
||
51 |
QT_PLUGIN_VERIFY = QTPLUGIN DEPLOYMENT_PLUGIN |
|
52 |
for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) { |
|
53 |
for(QTPLUG, $$list($$lower($$unique($$QT_CURRENT_VERIFY)))) { |
|
54 |
qplugin_style = |
|
55 |
!qt_debug:!qt_release { |
|
56 |
CONFIG(debug, debug|release):qplugin_style = debug |
|
57 |
else:qplugin_style = release |
|
58 |
} else:CONFIG(qt_debug, qt_debug|qt_release) { |
|
59 |
qplugin_style = debug |
|
60 |
} else { |
|
61 |
qplugin_style = release |
|
62 |
} |
|
63 |
||
64 |
# Check if the plugin is known to Qt. We can use this to determine |
|
65 |
# the plugin path. Unknown plugins must rely on the default link path. |
|
66 |
ACCESSIBLEPLUGINS = qtaccessiblewidgets qtaccessiblecompatwidgets |
|
67 |
CODECPLUGINS = qcncodecs qjpcodecs qkrcodecs qtwcodecs |
|
68 |
DECORATIONPLUGINS = qdecorationdefault qdecorationwindows |
|
69 |
GFXDRIVERPLUGINS = qgfxvnc qscreenvfb qgfxsnap qgfxvga16 qgfxmatrox qgfxvoodoo qgfxtransformed qgfxshadowfb |
|
70 |
IMAGEPLUGINS = qgif qmng qjpeg qsvg |
|
71 |
INPUTPLUGINS = qimsw-multi |
|
72 |
MOUSEDRIVERPLUGINS = qtslibmousehandler |
|
73 |
SQLPLUGINS = qsqldb2 qsqloci qsqltds qsqlodbc qsqlpsql qsqlibase qsqlmysql qsqlite2 qsqlite |
|
74 |
PHONONPLUGINS = phonon_waveout phonon_ds9 |
|
75 |
||
76 |
ALLQTPLUGINS = $$ACCESSIBLEPLUGINS $$CODECPLUGINS $$DECORATIONPLUGINS $$GFXDRIVERPLUGINS $$IMAGEPLUGINS $$INPUTPLUGINS $$MOUSEDRIVERPLUGINS $$SQLPLUGINS $$PHONONPLUGINS |
|
77 |
||
78 |
QT_PLUGINPATH = |
|
79 |
contains(ALLQTPLUGINS, $$QTPLUG) { |
|
80 |
# Determine the plugin path |
|
81 |
contains(ACCESSIBLEPLUGINS, $$QTPLUG): QT_PLUGINPATH = accessible |
|
82 |
contains(CODECPLUGINS, $$QTPLUG): QT_PLUGINPATH = codecs |
|
83 |
contains(DECORATIONPLUGINS, $$QTPLUG): QT_PLUGINPATH = decorations |
|
84 |
contains(GFXDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = gfxdrivers |
|
85 |
contains(IMAGEPLUGINS, $$QTPLUG): QT_PLUGINPATH = imageformats |
|
86 |
contains(INPUTPLUGINS, $$QTPLUG): QT_PLUGINPATH = inputmethods |
|
87 |
contains(MOUSEDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = mousedrivers |
|
88 |
contains(SQLPLUGINS, $$QTPLUG): QT_PLUGINPATH = sqldrivers |
|
89 |
contains(PHONONPLUGINS, $$QTPLUG): QT_PLUGINPATH = phonon_backend |
|
90 |
} |
|
91 |
||
92 |
# Generate the plugin linker line |
|
93 |
target_qt:isEqual(TARGET, QTPLUG) { |
|
94 |
warning($$TARGET cannot have a QTPLUGIN of $$QTPLUG) |
|
95 |
} else { |
|
96 |
QT_LINKAGE = -l$${QTPLUG} |
|
97 |
win32 { |
|
98 |
CONFIG(debug, debug|release):QT_LINKAGE = -l$${QTPLUG}d |
|
99 |
} else:mac { |
|
100 |
isEqual(qplugin_style, debug):QT_LINKAGE = -l$${QTPLUG}_debug |
|
101 |
} |
|
102 |
} |
|
103 |
||
104 |
# Only link against plugin in static builds |
|
105 |
isEqual(QT_CURRENT_VERIFY, QTPLUGIN): { |
|
106 |
!isEmpty(QT_PLUGINPATH): LIBS *= -L$$[QT_INSTALL_PLUGINS]/$$QT_PLUGINPATH |
|
107 |
LIBS += $$QT_LINKAGE |
|
108 |
# if the plugin is linked statically there is no need to deploy it |
|
109 |
DEPLOYMENT_PLUGIN -= $$QT_CURRENT_VERIFY |
|
110 |
} |
|
111 |
isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:wince*: { |
|
112 |
QT_ITEM = |
|
113 |
CONFIG(debug, debug|release): QT_ITEM = $${QTPLUG}d4.dll |
|
114 |
else: QT_ITEM = $${QTPLUG}4.dll |
|
115 |
||
116 |
eval(qt_additional_plugin_$${QTPLUG}.sources = $$[QT_INSTALL_PLUGINS]/$${QT_PLUGINPATH}/$${QT_ITEM}) |
|
117 |
eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH}) |
|
118 |
||
119 |
DEPLOYMENT *= qt_additional_plugin_$${QTPLUG} |
|
120 |
} |
|
121 |
isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:symbian: { |
|
122 |
QT_ITEM = $${QTPLUG}.dll |
|
123 |
||
124 |
eval(qt_additional_plugin_$${QTPLUG}.sources = $${QT_ITEM}) |
|
125 |
eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH}) |
|
126 |
||
127 |
DEPLOYMENT *= qt_additional_plugin_$${QTPLUG} |
|
128 |
} |
|
129 |
} |
|
130 |
} |
|
131 |
#specific module settings |
|
132 |
!isEmpty(QT_BUILD_TREE):QMAKE_LIBDIR = $$QT_BUILD_TREE/lib $$QMAKE_LIBDIR #as above, prepending prevents us from picking up "stale" libs |
|
133 |
QMAKE_LIBDIR += $$QMAKE_LIBDIR_QT |
|
134 |
for(QTLIB, $$list($$lower($$unique(QT)))) { |
|
135 |
unset(qlib_style) |
|
136 |
!qt_debug:!qt_release { |
|
137 |
CONFIG(debug, debug|release):qlib_style = debug |
|
138 |
else:qlib_style = release |
|
139 |
} else:CONFIG(qt_debug, qt_debug|qt_release) { |
|
140 |
qlib_style = debug |
|
141 |
} else { |
|
142 |
qlib_style = release |
|
143 |
} |
|
144 |
||
145 |
unset(qlib) |
|
146 |
isEqual(QTLIB, gui):qlib = QtGui |
|
147 |
else:isEqual(QTLIB, network):qlib = QtNetwork |
|
148 |
else:isEqual(QTLIB, xml):qlib = QtXml |
|
149 |
else:isEqual(QTLIB, xmlpatterns):qlib = QtXmlPatterns |
|
150 |
else:isEqual(QTLIB, opengl):qlib = QtOpenGL |
|
151 |
else:isEqual(QTLIB, openvg):qlib = QtOpenVG |
|
152 |
else:isEqual(QTLIB, sql):qlib = QtSql |
|
153 |
else:isEqual(QTLIB, core):qlib = QtCore |
|
154 |
else:isEqual(QTLIB, canvas):qlib = QtCanvas |
|
155 |
else:isEqual(QTLIB, qt3support):qlib = Qt3Support |
|
156 |
else:isEqual(QTLIB, svg):qlib = QtSvg |
|
157 |
else:isEqual(QTLIB, script):qlib = QtScript |
|
158 |
else:isEqual(QTLIB, scripttools):qlib = QtScriptTools |
|
159 |
else:isEqual(QTLIB, testlib):qlib = QtTest |
|
160 |
else:isEqual(QTLIB, dbus):qlib = QtDBus |
|
161 |
else:isEqual(QTLIB, phonon) { |
|
162 |
qlib = phonon |
|
163 |
INCLUDEPATH += $$QMAKE_INCDIR_QT/phonon_compat/phonon |
|
164 |
INCLUDEPATH += $$QMAKE_INCDIR_QT/phonon_compat |
|
165 |
INCLUDEPATH += $$QMAKE_INCDIR_QT/phonon/Phonon |
|
166 |
||
167 |
# The Helix backend requires this. Since we can't let a plugin set it, |
|
168 |
# we bump the values for all Symbian Phonon plugins. |
|
169 |
symbian:isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x040000 0x1600000 |
|
170 |
||
171 |
} else:isEqual(QTLIB, webkit):qlib = QtWebKit |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
172 |
else:isEqual(QTLIB, declarative):qlib = QtDeclarative |
0 | 173 |
else:isEqual(QTLIB, multimedia):qlib = QtMultimedia |
174 |
else:message("Unknown QT: $$QTLIB"):qlib = |
|
175 |
!isEmpty(qlib) { |
|
176 |
target_qt:isEqual(TARGET, qlib) { |
|
177 |
warning($$TARGET cannot have a QT of $$QTLIB) |
|
178 |
} else { |
|
179 |
DEFINES *= $$upper(QT_$${QTLIB}_LIB) |
|
180 |
isEqual(QTLIB, opengl):CONFIG += opengl |
|
181 |
isEqual(QTLIB, openvg):CONFIG += openvg |
|
182 |
isEqual(QTLIB, qt3support):DEFINES *= QT3_SUPPORT |
|
183 |
isEqual(QTLIB, testlib):CONFIG += console |
|
184 |
isEqual(QTLIB, dbus):CONFIG += dbusadaptors dbusinterfaces |
|
185 |
||
186 |
qtAddLibrary($$qlib) |
|
187 |
} |
|
188 |
} |
|
189 |
} |
|
190 |
||
191 |
qt_compat { |
|
192 |
!qt_compat_no_warning:QTDIR_build:warning(***USE of COMPAT inside of QTDIR!**) #just for us |
|
193 |
INCLUDEPATH *= $$QMAKE_INCDIR_QT/Qt |
|
194 |
DEFINES *= QT_COMPAT |
|
195 |
} |
|
196 |
||
197 |
wince*:static:gui { |
|
198 |
QTLIB += qmenu_wce.res |
|
199 |
} |
|
200 |
||
201 |
!isEmpty(QT_NAMESPACE):DEFINES *= QT_NAMESPACE=$$QT_NAMESPACE |
|
202 |
mac { |
|
203 |
!isEmpty(QT_NAMESPACE_MAC_CRC):DEFINES *= QT_NAMESPACE_MAC_CRC=$$QT_NAMESPACE_MAC_CRC |
|
204 |
} |