34cb86d46b
autotests often need private headers (especially with qpa headers now being private) and have no compatibility requirements, so it makes sense to just use the privates of requested modules. this also suppresses the useless warning about using privates, in case they are still explicitly specified. Change-Id: I9e499bedcf6ef25777283ff1432cef7254e9093a Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
188 lines
7.7 KiB
Plaintext
188 lines
7.7 KiB
Plaintext
CONFIG *= thread
|
|
|
|
#handle defines
|
|
win32 {
|
|
qt_static:DEFINES += QT_NODLL
|
|
!contains(DEFINES, QT_NODLL) {
|
|
QT_ENV_DLL = $$(QT_DLL)
|
|
QT_ENV_NO_DLL = $$(QT_NODLL)
|
|
isEmpty(QT_ENV_NO_DLL) {
|
|
shared|!isEmpty(QT_ENV_DLL):DEFINES += QT_DLL
|
|
}
|
|
contains(DEFINES, QT_MAKEDLL)|contains(DEFINES, QT_DLL):QMAKE_QT_DLL = 1
|
|
}
|
|
# Some files include qplatformdefs.h, which lives in the individual mkspec directory
|
|
# However, if QMAKESPEC_ORIGINAL is set, the module/app is outside of the QtBase
|
|
# directory, and using the default profile. So we add the original mkspecs directory
|
|
# to the include path
|
|
!isEmpty(QMAKESPEC_ORIGINAL):INCLUDEPATH += $$QMAKESPEC_ORIGINAL
|
|
}
|
|
CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG
|
|
contains(QT_CONFIG, force_asserts):DEFINES += QT_FORCE_ASSERTS
|
|
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
|
|
BEARERPLUGINS = qgenericbearer qnativewifibearer
|
|
CODECPLUGINS = qcncodecs qjpcodecs qkrcodecs qtwcodecs
|
|
DECORATIONPLUGINS = qdecorationdefault qdecorationstyled qdecorationwindows
|
|
GFXDRIVERPLUGINS = qscreenvfb qgfxtransformed qgfxshadowfb qgfxpvregl qscreenlinuxfb qeglnullws qdirectfbscreen qahiscreen
|
|
GRAPHICSSYSTEMPLUGINS = qmeegographicssystem qglgraphicssystem qvggraphicssystem qshivavggraphicssystem
|
|
IMAGEPLUGINS = qgif qico qjpeg qsvg
|
|
INPUTPLUGINS = qimsw-multi
|
|
KBDDRIVERPLUGINS = qlinuxinputkbddriver
|
|
MOUSEDRIVERPLUGINS = qtslibmousehandler qpcmousedriver qlinuxtpmousedriver
|
|
SQLPLUGINS = qsqldb2 qsqloci qsqltds qsqlodbc qsqlpsql qsqlibase qsqlmysql qsqlite2 qsqlite
|
|
PHONONPLUGINS = phonon_waveout phonon_ds9 phonon_gstreamer phonon_qt7 phonon_mmf
|
|
|
|
ALLQTPLUGINS = $$ACCESSIBLEPLUGINS $$BEARERPLUGINS $$CODECPLUGINS $$DECORATIONPLUGINS $$GFXDRIVERPLUGINS $$ GRAPHICSSYSTEMPLUGINS $$IMAGEPLUGINS $$INPUTPLUGINS $$KBDDRIVERPLUGINS $$MOUSEDRIVERPLUGINS $$SQLPLUGINS $$PHONONPLUGINS
|
|
|
|
QT_PLUGINPATH =
|
|
contains(ALLQTPLUGINS, $$QTPLUG) {
|
|
# Determine the plugin path
|
|
contains(ACCESSIBLEPLUGINS, $$QTPLUG): QT_PLUGINPATH = accessible
|
|
contains(BEARERPLUGINS, $$QTPLUG): QT_PLUGINPATH = bearer
|
|
contains(CODECPLUGINS, $$QTPLUG): QT_PLUGINPATH = codecs
|
|
contains(DECORATIONPLUGINS, $$QTPLUG): QT_PLUGINPATH = decorations
|
|
contains(GFXDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = gfxdrivers
|
|
contains(GRAPHICSSYSTEMPLUGINS, $$QTPLUG): QT_PLUGINPATH = graphicssystems
|
|
contains(IMAGEPLUGINS, $$QTPLUG): QT_PLUGINPATH = imageformats
|
|
contains(INPUTPLUGINS, $$QTPLUG): QT_PLUGINPATH = inputmethods
|
|
contains(KBDDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = kbddrivers
|
|
contains(MOUSEDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = mousedrivers
|
|
contains(SQLPLUGINS, $$QTPLUG): QT_PLUGINPATH = sqldrivers
|
|
contains(PHONONPLUGINS, $$QTPLUG): QT_PLUGINPATH = phonon_backend
|
|
}
|
|
|
|
# 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): {
|
|
!isEmpty(QT_PLUGINPATH): LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/$$QT_PLUGINPATH
|
|
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
|
|
|
|
eval(qt_additional_plugin_$${QTPLUG}.files = $$[QT_INSTALL_PLUGINS/get]/$${QT_PLUGINPATH}/$${QT_ITEM})
|
|
eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH})
|
|
|
|
DEPLOYMENT *= qt_additional_plugin_$${QTPLUG}
|
|
}
|
|
}
|
|
}
|
|
|
|
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 {
|
|
warning("CONFIG+=desiger is deprecated. Use QT+=designer instead.")
|
|
QT += designer
|
|
}
|
|
uitools {
|
|
warning("CONFIG+=uitools is deprecated. Use QT+=uitools instead.")
|
|
QT += uitools
|
|
}
|
|
|
|
# Figure out from which modules we're wanting to use the private headers
|
|
unset(using_privates)
|
|
NEWQT =
|
|
for(QTLIB, QT) {
|
|
QTLIBRAW = $$replace(QTLIB, -private$, )
|
|
!isEqual(QTLIBRAW, $$QTLIB) {
|
|
want_var = QT.$${QTLIBRAW}.want_private
|
|
$$want_var = UsePrivate
|
|
using_privates = true
|
|
NEWQT += $$eval(QT.$${QTLIBRAW}.private_depends)
|
|
}
|
|
NEWQT += $$QTLIBRAW
|
|
contains(QT.$${QTLIBRAW}.CONFIG, auto_use_privates): CONFIG += auto_use_privates
|
|
}
|
|
# Topological resolution of modules based on their QT.<module>.depends variable
|
|
QT = $$resolve_depends(NEWQT, "QT.")
|
|
# Finally actually add the modules
|
|
unset(BAD_QT)
|
|
for(QTLIB, QT) {
|
|
QTLIBNAME = $$eval(QT.$${QTLIB}.name)
|
|
isEmpty(QTLIBNAME) {
|
|
BAD_QT += $$QTLIB
|
|
next()
|
|
}
|
|
|
|
target_qt:isEqual(TARGET, $$QTLIBNAME) {
|
|
warning($$TARGET cannot have a QT of $$QTLIB)
|
|
next()
|
|
}
|
|
|
|
qtAddModule($$QTLIB, $$eval(QT.$${QTLIB}.want_private))
|
|
}
|
|
!isEmpty(BAD_QT):error("Unknown module(s) in QT: $$BAD_QT")
|
|
|
|
!isEmpty(using_privates):!auto_use_privates:!no_private_qt_headers_warning:if(!debug_and_release|!build_pass) {
|
|
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!")
|
|
}
|
|
|
|
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
|
|
}
|