CMake: Set define for default QPA platform
This is used to set the default QPA platform and without it all Gui applications trigger an assert in QString:-/ This is way simpler than going through configure.json. Change-Id: I2c053e95c0f7e99e97a0b2918d8e4ac13d3494fd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
c4bdddf917
commit
5c05c46e92
@ -230,6 +230,7 @@ add_qt_module(Gui
|
||||
DEFINES
|
||||
QT_NO_USING_NAMESPACE
|
||||
QT_NO_FOREACH
|
||||
QT_QPA_DEFAULT_PLATFORM_NAME="${QT_QPA_DEFAULT_PLATFORM}"
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
ZLIB::ZLIB
|
||||
|
@ -930,5 +930,3 @@ qt_feature("whatsthis" PUBLIC
|
||||
PURPOSE "Supports displaying \"What's this\" help."
|
||||
)
|
||||
qt_feature_definition("whatsthis" "QT_NO_WHATSTHIS" NEGATE VALUE "1")
|
||||
|
||||
qt_extra_definition("QT_QPA_DEFAULT_PLATFORM" "${QT_QPA_DEFAULT_PLATFORM}" PUBLIC)
|
||||
|
@ -1008,9 +1008,6 @@ def processJson(dir, ctx, data):
|
||||
cm_fh.write('qt_extra_definition("QT_VERSION_MINOR" ${PROJECT_VERSION_MINOR} PUBLIC)\n')
|
||||
cm_fh.write('qt_extra_definition("QT_VERSION_PATCH" ${PROJECT_VERSION_PATCH} PUBLIC)\n')
|
||||
|
||||
if ctx.get('module') == 'gui':
|
||||
cm_fh.write('\nqt_extra_definition("QT_QPA_DEFAULT_PLATFORM" "${QT_QPA_DEFAULT_PLATFORM}" PUBLIC)\n')
|
||||
|
||||
# do this late:
|
||||
processSubconfigs(dir, ctx, data)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user