summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/permissions.prf
blob: d80df6d01e54d0ca4cc1f1cd817de0e30178c864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
isEmpty(QMAKE_INFO_PLIST): \
    return()

for(plugin, QT_PLUGINS) {
    !equals(QT_PLUGIN.$${plugin}.TYPE, permissions): \
        next()

    usage_descriptions = $$eval(QT_PLUGIN.$${plugin}.usage_descriptions)
    for(usage_description_key, usage_descriptions) {
        usage_description = $$system("/usr/libexec/PlistBuddy" \
        "-c 'print $$usage_description_key' $$QMAKE_INFO_PLIST 2>/dev/null")
        !isEmpty(usage_description): \
            break()
    }

    isEmpty(usage_description): \
        next()

    request_flag = $$eval(QT_PLUGIN.$${plugin}.request_flag)

    QTPLUGIN += $$plugin
    QMAKE_LFLAGS += $$request_flag

    QMAKE_INTERNAL_INCLUDED_FILES *= $$QMAKE_INFO_PLIST
}