qt5base-lts/mkspecs/features/permissions.prf
Tor Arne Vestbø 457300ff60 permissions: Don't try to read usage descriptions from non-existing plist
Task-number: QTBUG-110356
Pick-to: 6.5
Change-Id: I8078556fbe67e98af2fcfe8222a8ce097df69f08
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-01-23 19:25:06 +01:00

35 lines
917 B
Plaintext

isEmpty(QMAKE_INFO_PLIST)|!exists($$QMAKE_INFO_PLIST): \
return()
for(plugin, QT_PLUGINS) {
!equals(QT_PLUGIN.$${plugin}.TYPE, permissions): \
next()
usage_descriptions = $$eval(QT_PLUGIN.$${plugin}.usage_descriptions)
found_usage_description = false
for(usage_description_key, usage_descriptions) {
usage_description = $$system("/usr/libexec/PlistBuddy" \
"-c 'print $$usage_description_key' $$QMAKE_INFO_PLIST 2>/dev/null", \
singleLine, exit_code)
!equals(exit_code, 0): \
next()
!isEmpty(usage_description) {
found_usage_description = true
break()
}
}
!$$found_usage_description: \
next()
request_flag = $$eval(QT_PLUGIN.$${plugin}.request_flag)
QTPLUGIN += $$plugin
QMAKE_LFLAGS += $$request_flag
QMAKE_INTERNAL_INCLUDED_FILES *= $$QMAKE_INFO_PLIST
}