2012-02-24 18:21:51 +00:00
|
|
|
CONFIG *= thread
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#handle defines
|
|
|
|
win32 {
|
2012-05-30 10:09:00 +00:00
|
|
|
# ### QT_NODLL and QT_DLL are compatibility, remove before the Qt 5.0 release
|
|
|
|
contains(QT_CONFIG, shared) {
|
|
|
|
DEFINES += QT_DLL
|
|
|
|
|
|
|
|
# this variable is read by qmake in qmake/generators/win32/msvc_vcproj.cpp
|
|
|
|
# function VcprojGenerator::initDeploymentTool(), which contains some hardcoded
|
|
|
|
# library names (the ones that were static in Qt 4)
|
|
|
|
# it probably doesn't work anymore and should not be in this file
|
|
|
|
QMAKE_QT_DLL = 1
|
|
|
|
} else {
|
|
|
|
DEFINES += QT_NODLL
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG
|
2011-11-11 10:21:52 +00:00
|
|
|
contains(QT_CONFIG, force_asserts):DEFINES += QT_FORCE_ASSERTS
|
2011-04-27 10:05:43 +00:00
|
|
|
no_keywords:DEFINES += QT_NO_KEYWORDS
|
|
|
|
plugin { #Qt plugins
|
|
|
|
static:DEFINES += QT_STATICPLUGIN
|
|
|
|
DEFINES += QT_PLUGIN
|
|
|
|
|
|
|
|
# Triggers both on Qt being configured with -arch boundschecker,
|
|
|
|
# and if you qmake CONFIG+=boundchecker on your plugin project
|
|
|
|
boundschecker|contains(QT_CONFIG,boundschecker) {
|
|
|
|
# This option is added for plugins when Qt is configured for Boundschecker,
|
|
|
|
# since we want Boundschecker to not instrument the qt_plugin_query_verification_data
|
|
|
|
# function, as we call that function without the plugin's dependent DLLs, thus
|
|
|
|
# Boundscheckers instrumentation will fail. The function only returns a const char *,
|
|
|
|
# so no instrumentation is really needed on that function anyways.
|
|
|
|
QMAKE_CFLAGS += /nmignore:*:qt_plugin_query_verification_data
|
|
|
|
QMAKE_CXXFLAGS += /nmignore:*:qt_plugin_query_verification_data
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
QT_PLUGIN_VERIFY = QTPLUGIN DEPLOYMENT_PLUGIN
|
|
|
|
for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) {
|
|
|
|
for(QTPLUG, $$list($$lower($$unique($$QT_CURRENT_VERIFY)))) {
|
|
|
|
qplugin_style =
|
|
|
|
!qt_debug:!qt_release {
|
|
|
|
CONFIG(debug, debug|release):qplugin_style = debug
|
|
|
|
else:qplugin_style = release
|
|
|
|
} else:CONFIG(qt_debug, qt_debug|qt_release) {
|
|
|
|
qplugin_style = debug
|
|
|
|
} else {
|
|
|
|
qplugin_style = release
|
|
|
|
}
|
|
|
|
|
|
|
|
# Check if the plugin is known to Qt. We can use this to determine
|
|
|
|
# the plugin path. Unknown plugins must rely on the default link path.
|
|
|
|
ACCESSIBLEPLUGINS = qtaccessiblewidgets qtaccessiblecompatwidgets
|
2011-09-19 17:10:14 +00:00
|
|
|
BEARERPLUGINS = qgenericbearer qnativewifibearer
|
2011-04-27 10:05:43 +00:00
|
|
|
CODECPLUGINS = qcncodecs qjpcodecs qkrcodecs qtwcodecs
|
2011-09-19 17:10:14 +00:00
|
|
|
DECORATIONPLUGINS = qdecorationdefault qdecorationstyled qdecorationwindows
|
2012-03-06 11:23:31 +00:00
|
|
|
GFXDRIVERPLUGINS = qscreenvfb qgfxtransformed qgfxshadowfb qgfxpvregl qscreenlinuxfb qeglnullws qdirectfbscreen qahiscreen
|
2011-09-19 17:10:14 +00:00
|
|
|
GRAPHICSSYSTEMPLUGINS = qmeegographicssystem qglgraphicssystem qvggraphicssystem qshivavggraphicssystem
|
2012-01-25 15:04:51 +00:00
|
|
|
IMAGEPLUGINS = qgif qico qjpeg qsvg
|
2011-04-27 10:05:43 +00:00
|
|
|
INPUTPLUGINS = qimsw-multi
|
2011-09-19 17:10:14 +00:00
|
|
|
KBDDRIVERPLUGINS = qlinuxinputkbddriver
|
|
|
|
MOUSEDRIVERPLUGINS = qtslibmousehandler qpcmousedriver qlinuxtpmousedriver
|
2011-04-27 10:05:43 +00:00
|
|
|
SQLPLUGINS = qsqldb2 qsqloci qsqltds qsqlodbc qsqlpsql qsqlibase qsqlmysql qsqlite2 qsqlite
|
2011-09-19 17:10:14 +00:00
|
|
|
PHONONPLUGINS = phonon_waveout phonon_ds9 phonon_gstreamer phonon_qt7 phonon_mmf
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-07-24 12:39:53 +00:00
|
|
|
ALLQTPLUGINS = $$ACCESSIBLEPLUGINS $$BEARERPLUGINS $$CODECPLUGINS $$DECORATIONPLUGINS $$GFXDRIVERPLUGINS $$GRAPHICSSYSTEMPLUGINS $$IMAGEPLUGINS $$INPUTPLUGINS $$KBDDRIVERPLUGINS $$MOUSEDRIVERPLUGINS $$SQLPLUGINS $$PHONONPLUGINS
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
QT_PLUGINPATH =
|
|
|
|
contains(ALLQTPLUGINS, $$QTPLUG) {
|
|
|
|
# Determine the plugin path
|
|
|
|
contains(ACCESSIBLEPLUGINS, $$QTPLUG): QT_PLUGINPATH = accessible
|
2011-09-19 17:10:14 +00:00
|
|
|
contains(BEARERPLUGINS, $$QTPLUG): QT_PLUGINPATH = bearer
|
2011-04-27 10:05:43 +00:00
|
|
|
contains(CODECPLUGINS, $$QTPLUG): QT_PLUGINPATH = codecs
|
|
|
|
contains(DECORATIONPLUGINS, $$QTPLUG): QT_PLUGINPATH = decorations
|
|
|
|
contains(GFXDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = gfxdrivers
|
2011-09-19 17:10:14 +00:00
|
|
|
contains(GRAPHICSSYSTEMPLUGINS, $$QTPLUG): QT_PLUGINPATH = graphicssystems
|
2011-04-27 10:05:43 +00:00
|
|
|
contains(IMAGEPLUGINS, $$QTPLUG): QT_PLUGINPATH = imageformats
|
|
|
|
contains(INPUTPLUGINS, $$QTPLUG): QT_PLUGINPATH = inputmethods
|
2011-09-19 17:10:14 +00:00
|
|
|
contains(KBDDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = kbddrivers
|
2011-04-27 10:05:43 +00:00
|
|
|
contains(MOUSEDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = mousedrivers
|
|
|
|
contains(SQLPLUGINS, $$QTPLUG): QT_PLUGINPATH = sqldrivers
|
2011-09-19 17:10:14 +00:00
|
|
|
contains(PHONONPLUGINS, $$QTPLUG): QT_PLUGINPATH = phonon_backend
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Generate the plugin linker line
|
|
|
|
target_qt:isEqual(TARGET, QTPLUG) {
|
|
|
|
warning($$TARGET cannot have a QTPLUGIN of $$QTPLUG)
|
|
|
|
} else {
|
|
|
|
QT_LINKAGE = -l$${QTPLUG}
|
|
|
|
win32 {
|
|
|
|
CONFIG(debug, debug|release):QT_LINKAGE = -l$${QTPLUG}d
|
|
|
|
} else:mac {
|
|
|
|
isEqual(qplugin_style, debug):QT_LINKAGE = -l$${QTPLUG}_debug
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# Only link against plugin in static builds
|
|
|
|
isEqual(QT_CURRENT_VERIFY, QTPLUGIN): {
|
2012-03-22 11:40:00 +00:00
|
|
|
!isEmpty(QT_PLUGINPATH): LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/$$QT_PLUGINPATH
|
2011-04-27 10:05:43 +00:00
|
|
|
LIBS += $$QT_LINKAGE
|
|
|
|
# if the plugin is linked statically there is no need to deploy it
|
|
|
|
DEPLOYMENT_PLUGIN -= $$QT_CURRENT_VERIFY
|
|
|
|
}
|
|
|
|
isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:wince*: {
|
|
|
|
QT_ITEM =
|
|
|
|
CONFIG(debug, debug|release): QT_ITEM = $${QTPLUG}d4.dll
|
|
|
|
else: QT_ITEM = $${QTPLUG}4.dll
|
|
|
|
|
2012-03-22 11:40:00 +00:00
|
|
|
eval(qt_additional_plugin_$${QTPLUG}.files = $$[QT_INSTALL_PLUGINS/get]/$${QT_PLUGINPATH}/$${QT_ITEM})
|
2011-04-27 10:05:43 +00:00
|
|
|
eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH})
|
|
|
|
|
|
|
|
DEPLOYMENT *= qt_additional_plugin_$${QTPLUG}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-11-25 04:20:01 +00:00
|
|
|
|
2012-03-01 17:10:22 +00:00
|
|
|
qtestlib {
|
|
|
|
warning("CONFIG+=qtestlib is deprecated. Use QT+=testlib instead.")
|
|
|
|
QT += testlib
|
|
|
|
}
|
|
|
|
qdbus {
|
|
|
|
warning("CONFIG+=qdbus is deprecated. Use QT+=dbus instead.")
|
|
|
|
QT += dbus
|
|
|
|
}
|
|
|
|
help {
|
|
|
|
warning("CONFIG+=help is deprecated. Use QT+=help instead.")
|
|
|
|
QT += help-private # sic!
|
|
|
|
}
|
|
|
|
designer {
|
2012-07-20 16:25:02 +00:00
|
|
|
warning("CONFIG+=designer is deprecated. Use QT+=designer instead.")
|
2012-03-01 17:10:22 +00:00
|
|
|
QT += designer
|
|
|
|
}
|
|
|
|
uitools {
|
|
|
|
warning("CONFIG+=uitools is deprecated. Use QT+=uitools instead.")
|
|
|
|
QT += uitools
|
|
|
|
}
|
|
|
|
|
2012-02-24 18:18:02 +00:00
|
|
|
# Figure out from which modules we're wanting to use the private headers
|
2011-04-20 18:57:51 +00:00
|
|
|
unset(using_privates)
|
2012-02-24 18:18:02 +00:00
|
|
|
NEWQT =
|
2012-02-24 18:20:00 +00:00
|
|
|
for(QTLIB, QT) {
|
2012-02-24 18:18:02 +00:00
|
|
|
QTLIBRAW = $$replace(QTLIB, -private$, )
|
|
|
|
!isEqual(QTLIBRAW, $$QTLIB) {
|
|
|
|
want_var = QT.$${QTLIBRAW}.want_private
|
|
|
|
$$want_var = UsePrivate
|
|
|
|
using_privates = true
|
2012-04-19 17:21:32 +00:00
|
|
|
NEWQT += $$eval(QT.$${QTLIBRAW}.private_depends)
|
2011-04-20 18:57:51 +00:00
|
|
|
}
|
2012-02-24 18:18:02 +00:00
|
|
|
NEWQT += $$QTLIBRAW
|
2012-06-25 15:18:26 +00:00
|
|
|
contains(QT.$${QTLIBRAW}.CONFIG, auto_use_privates): CONFIG += auto_use_privates
|
2012-02-24 18:18:02 +00:00
|
|
|
}
|
|
|
|
# Topological resolution of modules based on their QT.<module>.depends variable
|
|
|
|
QT = $$resolve_depends(NEWQT, "QT.")
|
|
|
|
# Finally actually add the modules
|
2012-06-06 11:01:45 +00:00
|
|
|
unset(BAD_QT)
|
2012-02-24 18:18:02 +00:00
|
|
|
for(QTLIB, QT) {
|
2012-02-24 19:00:08 +00:00
|
|
|
QTLIBNAME = $$eval(QT.$${QTLIB}.name)
|
|
|
|
isEmpty(QTLIBNAME) {
|
2012-06-06 11:01:45 +00:00
|
|
|
BAD_QT += $$QTLIB
|
2010-11-25 04:20:01 +00:00
|
|
|
next()
|
|
|
|
}
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-02-24 19:00:08 +00:00
|
|
|
target_qt:isEqual(TARGET, $$QTLIBNAME) {
|
2010-11-25 04:20:01 +00:00
|
|
|
warning($$TARGET cannot have a QT of $$QTLIB)
|
|
|
|
next()
|
|
|
|
}
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-02-24 18:18:02 +00:00
|
|
|
qtAddModule($$QTLIB, $$eval(QT.$${QTLIB}.want_private))
|
|
|
|
}
|
2012-06-06 11:01:45 +00:00
|
|
|
!isEmpty(BAD_QT):error("Unknown module(s) in QT: $$BAD_QT")
|
2011-01-04 15:37:10 +00:00
|
|
|
|
2012-06-25 15:18:26 +00:00
|
|
|
!isEmpty(using_privates):!auto_use_privates:!no_private_qt_headers_warning:if(!debug_and_release|!build_pass) {
|
2011-04-20 18:57:51 +00:00
|
|
|
message("This project is using private headers and will therefore be tied to this specific Qt module build version.")
|
|
|
|
message("Running this project against other versions of the Qt modules may crash at any arbitrary point.")
|
|
|
|
message("This is not a bug, but a result of using Qt internals. You have been warned!")
|
|
|
|
}
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
wince*:static:gui {
|
|
|
|
QTLIB += qmenu_wce.res
|
|
|
|
}
|
|
|
|
|
|
|
|
!isEmpty(QT_NAMESPACE):DEFINES *= QT_NAMESPACE=$$QT_NAMESPACE
|
|
|
|
mac {
|
|
|
|
!isEmpty(QT_NAMESPACE_MAC_CRC):DEFINES *= QT_NAMESPACE_MAC_CRC=$$QT_NAMESPACE_MAC_CRC
|
|
|
|
}
|