aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/qt5plugin/plugin.qbs
blob: d704ab3855a95ca5aefc3606e12404ee015e21b3 (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
import qbs.base
import qbs.File
import qbs.FileInfo

DynamicLibrary {
    name: "echoplugin"

    Depends { name: "Qt.core" }
    Depends { name: "cpp" }

    Group {
        condition: Qt.core.versionMajor >= 5
        files: [
            "echoplugin.h",
            "echoplugin.cpp",
            "echoplugin.json.source"
        ]
    }
    Group {
        condition: Qt.core.versionMajor < 5
        files: "echoplugin_dummy.cpp"
    }

    cpp.includePaths: buildDirectory

    Transformer {
        condition: Qt.core.versionMajor >= 5
        inputs: ["echoplugin.json.source"]
        Artifact {
            fileName: "echoplugin.json"
            fileTags: ["qt_plugin_metadata"]
        }
        prepare: {
            var cmd = new JavaScriptCommand();
            cmd.description = "generating " + FileInfo.fileName(output.filePath);
            cmd.sourceCode = function() {
                File.copy(input.filePath, output.filePath);
            }
            return cmd;
        }
    }
}