summaryrefslogtreecommitdiff
path: root/examples/webchannel/exampleassets.pri
blob: bbdf656182730b89bbe82b9799d0cd950e31abb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# This adds the qwebchannel js library to an example, creating a self-contained bundle
QTDIR_build {
    # Build from within Qt. Copy and install the reference lib.
    jslib = $$dirname(_QMAKE_CONF_)/src/webchannel/qwebchannel.js
    assetcopy.files = $$jslib
} else {
    # This is what an actual 3rd party project would do.
    jslib = qwebchannel.js
}

# This installs all assets including qwebchannel.js, regardless of the source.
exampleassets.files += $$jslib
INSTALLS += exampleassets

# This code ensures that all assets are present in the build directory.

!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
    # Shadow build, copy all example assets.
    assetcopy.files = $$exampleassets.files
}

assetcopy.path = $$OUT_PWD
COPIES += assetcopy