File: lomiri_qml_plugin.prf

package info (click to toggle)
lomiri-ui-toolkit 1.3.5010%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 25,900 kB
  • sloc: cpp: 85,772; python: 5,528; sh: 1,364; javascript: 919; ansic: 573; makefile: 204
file content (80 lines) | stat: -rw-r--r-- 2,673 bytes parent folder | download | duplicates (2)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
load(lomiri_common)
load(qml_plugin)

CONFIG -= hide_symbols

load(lomiri_enable_testing)

#hacky hacks to build the qmltypes

!cross_compile:!qt_submodule_build {
    #should be already set by the qml_plugin.prf, but lets be safe
    isEmpty(IMPORT_VERSION): error("Must set IMPORT_VERSION")

    load(resolve_target)

    qml1_target {
        qmlplugindump = qml1plugindump
        importpath.name = QML_IMPORT_PATH
    } else {
        qmlplugindump = qmlplugindump
        importpath.name = QML2_IMPORT_PATH
    }

    qtPrepareTool(QMLPLUGINDUMP, $$qmlplugindump)
    importpath.value =
    for(qmod, QTREPOS) {
        qml1_target: \
            qmod = $$qmod/imports
        else: \
            qmod = $$qmod/qml
        exists($$qmod): importpath.value += $$shell_path($$qmod)
    }

    #add our path, somehow its not added automatically
    importpath.value += $$shell_path($$instbase)
    importpath.value = $$unique(importpath.value)

    membackend.name = ALARM_BACKEND
    membackend.value = memory

    #make sure qmlplugindump finds all libs
    ld_lib_path.name  = LD_LIBRARY_PATH
    ld_lib_path.value =
    for(qmod, QTREPOS) {
        qmod = $$qmod/lib
        exists($$qmod): ld_lib_path.value += $$shell_path($$qmod)
    }
    ld_lib_path.value += $$shell_path($$ROOT_BUILD_DIR/lib)
    ld_lib_path.value = $$unique(ld_lib_path.value)


    QMLPLUGINDUMP_ENV_VARS = importpath \
                             membackend \
                             ld_lib_path

    qtAddToolEnv(QMLPLUGINDUMP, $$QMLPLUGINDUMP_ENV_VARS)

    TARGETPATHBASE = $$replace(TARGETPATH, \\.\\d+\$, )

    QMLTYPEFILE = $$instbase/$$TARGETPATH/plugins.qmltypes
    autobld_qmltypes.target = $$QMLTYPEFILE
    autobld_qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$replace(TARGETPATHBASE, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE
    autobld_qmltypes.commands += && sed -i \'s?-1.-1\"?0.1\"?\' $$QMLTYPEFILE
    autobld_qmltypes.commands += && sed -i \'s?exportMetaObjectRevisions: \\[-1\\]?exportMetaObjectRevisions: [0,0]?\' $$QMLTYPEFILE
    autobld_qmltypes.depends = $$QMAKE_RESOLVED_TARGET

    autobld_install_qmltypes.files = $$QMLTYPEFILE
    autobld_install_qmltypes.depends = $$QMLTYPEFILE
    autobld_install_qmltypes.path  = $$[QT_INSTALL_QML]/$$TARGETPATH
    autobld_install_qmltypes.CONFIG += no_check_exist

    INSTALLS+=autobld_install_qmltypes
    QMAKE_EXTRA_TARGETS += autobld_qmltypes
}

# warnings_are_errors depending on the compiler version, sometimes it doesn't
# add the required flags (for instance for recent clang version on old Qt).
warnings_are_errors:!contains(QMAKE_CXXFLAGS_WARN_ON, -Werror){
    QMAKE_CXXFLAGS_WARN_ON += -Werror
}