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
12 contains(DEFINES, QT_MAKEDLL)|contains(DEFINES, QT_DLL):QMAKE_QT_DLL = 1
14 # Some files include qplatformdefs.h, which lives in the individual mkspec directory
15 # However, if QMAKESPEC_ORIGINAL is set, the module/app is outside of the QtBase
16 # directory, and using the default profile. So we add the original mkspecs directory
18 !isEmpty(QMAKESPEC_ORIGINAL):INCLUDEPATH += $$QMAKESPEC_ORIGINAL
20 CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG
21 contains(QT_CONFIG, force_asserts):DEFINES += QT_FORCE_ASSERTS
22 no_keywords:DEFINES += QT_NO_KEYWORDS
24 static:DEFINES += QT_STATICPLUGIN
27 # Triggers both on Qt being configured with -arch boundschecker,
28 # and if you qmake CONFIG+=boundchecker on your plugin project
29 boundschecker|contains(QT_CONFIG,boundschecker) {
30 # This option is added for plugins when Qt is configured for Boundschecker,
31 # since we want Boundschecker to not instrument the qt_plugin_query_verification_data
32 # function, as we call that function without the plugin's dependent DLLs, thus
33 # Boundscheckers instrumentation will fail. The function only returns a const char *,
34 # so no instrumentation is really needed on that function anyways.
35 QMAKE_CFLAGS += /nmignore:*:qt_plugin_query_verification_data
36 QMAKE_CXXFLAGS += /nmignore:*:qt_plugin_query_verification_data
41 INCLUDEPATH = $$QMAKE_INCDIR_QT $$INCLUDEPATH #prepending prevents us from picking up "stale" includes
43 QT_PLUGIN_VERIFY = QTPLUGIN DEPLOYMENT_PLUGIN
44 for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) {
45 for(QTPLUG, $$list($$lower($$unique($$QT_CURRENT_VERIFY)))) {
47 !qt_debug:!qt_release {
48 CONFIG(debug, debug|release):qplugin_style = debug
49 else:qplugin_style = release
50 } else:CONFIG(qt_debug, qt_debug|qt_release) {
53 qplugin_style = release
56 # Check if the plugin is known to Qt. We can use this to determine
57 # the plugin path. Unknown plugins must rely on the default link path.
58 ACCESSIBLEPLUGINS = qtaccessiblewidgets qtaccessiblecompatwidgets
59 BEARERPLUGINS = qgenericbearer qnativewifibearer
60 CODECPLUGINS = qcncodecs qjpcodecs qkrcodecs qtwcodecs
61 DECORATIONPLUGINS = qdecorationdefault qdecorationstyled qdecorationwindows
62 GFXDRIVERPLUGINS = qgfxvnc qscreenvfb qgfxtransformed qgfxshadowfb qgfxpvregl qscreenlinuxfb qeglnullws qdirectfbscreen qahiscreen
63 GRAPHICSSYSTEMPLUGINS = qmeegographicssystem qglgraphicssystem qvggraphicssystem qshivavggraphicssystem
64 IMAGEPLUGINS = qgif qico qjpeg qsvg
65 INPUTPLUGINS = qimsw-multi
66 KBDDRIVERPLUGINS = qlinuxinputkbddriver
67 MOUSEDRIVERPLUGINS = qtslibmousehandler qpcmousedriver qlinuxtpmousedriver
68 SQLPLUGINS = qsqldb2 qsqloci qsqltds qsqlodbc qsqlpsql qsqlibase qsqlmysql qsqlite2 qsqlite
69 PHONONPLUGINS = phonon_waveout phonon_ds9 phonon_gstreamer phonon_qt7 phonon_mmf
71 ALLQTPLUGINS = $$ACCESSIBLEPLUGINS $$BEARERPLUGINS $$CODECPLUGINS $$DECORATIONPLUGINS $$GFXDRIVERPLUGINS $$ GRAPHICSSYSTEMPLUGINS $$IMAGEPLUGINS $$INPUTPLUGINS $$KBDDRIVERPLUGINS $$MOUSEDRIVERPLUGINS $$SQLPLUGINS $$PHONONPLUGINS
74 contains(ALLQTPLUGINS, $$QTPLUG) {
75 # Determine the plugin path
76 contains(ACCESSIBLEPLUGINS, $$QTPLUG): QT_PLUGINPATH = accessible
77 contains(BEARERPLUGINS, $$QTPLUG): QT_PLUGINPATH = bearer
78 contains(CODECPLUGINS, $$QTPLUG): QT_PLUGINPATH = codecs
79 contains(DECORATIONPLUGINS, $$QTPLUG): QT_PLUGINPATH = decorations
80 contains(GFXDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = gfxdrivers
81 contains(GRAPHICSSYSTEMPLUGINS, $$QTPLUG): QT_PLUGINPATH = graphicssystems
82 contains(IMAGEPLUGINS, $$QTPLUG): QT_PLUGINPATH = imageformats
83 contains(INPUTPLUGINS, $$QTPLUG): QT_PLUGINPATH = inputmethods
84 contains(KBDDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = kbddrivers
85 contains(MOUSEDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = mousedrivers
86 contains(SQLPLUGINS, $$QTPLUG): QT_PLUGINPATH = sqldrivers
87 contains(PHONONPLUGINS, $$QTPLUG): QT_PLUGINPATH = phonon_backend
90 # Generate the plugin linker line
91 target_qt:isEqual(TARGET, QTPLUG) {
92 warning($$TARGET cannot have a QTPLUGIN of $$QTPLUG)
94 QT_LINKAGE = -l$${QTPLUG}
96 CONFIG(debug, debug|release):QT_LINKAGE = -l$${QTPLUG}d
98 isEqual(qplugin_style, debug):QT_LINKAGE = -l$${QTPLUG}_debug
102 # Only link against plugin in static builds
103 isEqual(QT_CURRENT_VERIFY, QTPLUGIN): {
104 !isEmpty(QT_PLUGINPATH): LIBS *= -L$$[QT_INSTALL_PLUGINS]/$$QT_PLUGINPATH
106 # if the plugin is linked statically there is no need to deploy it
107 DEPLOYMENT_PLUGIN -= $$QT_CURRENT_VERIFY
109 isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:wince*: {
111 CONFIG(debug, debug|release): QT_ITEM = $${QTPLUG}d4.dll
112 else: QT_ITEM = $${QTPLUG}4.dll
114 eval(qt_additional_plugin_$${QTPLUG}.files = $$[QT_INSTALL_PLUGINS]/$${QT_PLUGINPATH}/$${QT_ITEM})
115 eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH})
117 DEPLOYMENT *= qt_additional_plugin_$${QTPLUG}
124 #specific module settings
125 !isEmpty(QT_BUILD_TREE):QMAKE_LIBDIR = $$QT_BUILD_TREE/lib $$QMAKE_LIBDIR #as above, prepending prevents us from picking up "stale" libs
126 QMAKE_LIBDIR += $$QMAKE_LIBDIR_QT
128 # Topological ordering of modules based on their QT.<module>.depends variable
129 QT = $$sort_depends(QT, "QT.")
133 unset(using_privates)
135 # Figure out if we're wanting to use the private headers of a module
136 contains(QTLIB, .*-private) {
137 QTLIB ~= s/-private//
138 use_private = UsePrivate
140 use_private = NoPrivate
143 isEmpty(QT.$${QTLIB}.name) {
144 message("Warning: unknown QT module: $$QTLIB")
148 target_qt:isEqual(TARGET, QTLIB) {
149 warning($$TARGET cannot have a QT of $$QTLIB)
152 qtAddModule($$QTLIB, $$use_private)
153 QT_DEPENDS += $$eval(QT.$${QTLIB}.depends)
154 isEqual(use_private, UsePrivate):using_privates = true
157 # add include paths for all .depends, since module/application might need f.ex. template specializations etc.
159 for(QTLIB, $$list($$lower($$unique(QT_DEPENDS)))):INCLUDEPATH *= $$INCLUDEPATH $$eval(QT.$${QTLIB}.includes)
161 !isEmpty(using_privates):!no_private_qt_headers_warning:if(!debug_and_release|!build_pass) {
162 message("This project is using private headers and will therefore be tied to this specific Qt module build version.")
163 message("Running this project against other versions of the Qt modules may crash at any arbitrary point.")
164 message("This is not a bug, but a result of using Qt internals. You have been warned!")
168 !qt_compat_no_warning:QTDIR_build:warning(***USE of COMPAT inside of QTDIR!**) #just for us
169 INCLUDEPATH *= $$QMAKE_INCDIR_QT/Qt
174 QTLIB += qmenu_wce.res
177 !isEmpty(QT_NAMESPACE):DEFINES *= QT_NAMESPACE=$$QT_NAMESPACE
179 !isEmpty(QT_NAMESPACE_MAC_CRC):DEFINES *= QT_NAMESPACE_MAC_CRC=$$QT_NAMESPACE_MAC_CRC
183 mmx:DEFINES += QT_HAVE_MMX
184 3dnow:DEFINES += QT_HAVE_3DNOW
185 sse:DEFINES += QT_HAVE_SSE QT_HAVE_MMXEXT
186 sse2:DEFINES += QT_HAVE_SSE2
187 sse3:DEFINES += QT_HAVE_SSE3
188 ssse3:DEFINES += QT_HAVE_SSSE3
189 sse4_1:DEFINES += QT_HAVE_SSE4_1
190 sse4_2:DEFINES += QT_HAVE_SSE4_2
191 avx:DEFINES += QT_HAVE_AVX
192 iwmmxt:DEFINES += QT_HAVE_IWMMXT