summaryrefslogtreecommitdiffstats
path: root/src/imports/compositor/compositor.pro
blob: 50b26d4d098bdfb9f8b9aa08cd5994a00036271c (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
CXX_MODULE = qml
TARGET  = qwaylandcompositorplugin
TARGETPATH = QtWayland/Compositor
IMPORT_VERSION = 1.3

HEADERS += \
    qwaylandmousetracker_p.h

SOURCES += \
    qwaylandquickcompositorplugin.cpp \
    qwaylandmousetracker.cpp

COMPOSITOR_QML_FILES += \
    WaylandOutputWindow.qml \
    WaylandCursorItem.qml

DEFINES += QT_WAYLAND_COMPOSITOR_QUICK

# Create the resource file
GENERATED_RESOURCE_FILE = $$OUT_PWD/compositor.qrc

RESOURCE_CONTENT = \
    "<RCC>" \
    "<qresource prefix=\"/QtWayland/Compositor\">"

for(resourcefile, COMPOSITOR_QML_FILES) {
    resourcefileabsolutepath = $$absolute_path($$resourcefile)
    relativepath_in = $$relative_path($$resourcefileabsolutepath, $$_PRO_FILE_PWD_)
    relativepath_out = $$relative_path($$resourcefileabsolutepath, $$OUT_PWD)
    RESOURCE_CONTENT += "<file alias=\"$$relativepath_in\">$$relativepath_out</file>"
}

RESOURCE_CONTENT += \
    "</qresource>" \
    "</RCC>"

write_file($$GENERATED_RESOURCE_FILE, RESOURCE_CONTENT)|error("Aborting.")

RESOURCES += $$GENERATED_RESOURCE_FILE

# In case of a debug build, deploy the QML files too
CONFIG(debug, debug|release): QML_FILES += $$COMPOSITOR_QML_FILES

QT += quick-private qml-private gui-private core-private waylandcompositor waylandcompositor-private

load(qml_plugin)