aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/build-directories/project.qbs
blob: 025340a0ae473b715afff144cf7e380c90986586 (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
47
48
49
import qbs

Project {
    Product {
        name: "p1"
        type: "blubb1"
        Transformer {
            Artifact {
                fileName: "dummy1.txt"
                fileTags: product.type
            }
            prepare: {
                var cmd = new JavaScriptCommand();
                cmd.silent = true;
                cmd.sourceCode = function() {
                    print(product.buildDirectory);
                }
                return cmd;
            }
        }
    }
    Product {
        name: "p2"
        type: "blubb2"
        Depends { name: "p1" }
        Group {
            files: "input.txt"
            fileTags: "input"
        }
        Rule {
            inputs: "input"
            usings: "blubb1"
            Artifact {
                fileName: "dummy2.txt"
                fileTags: product.type
            }
            prepare: {
                var cmd = new JavaScriptCommand();
                cmd.silent = true;
                cmd.sourceCode = function() {
                    print(product.buildDirectory);
                    print(project.buildDirectory);
                    print(project.sourceDirectory);
                }
                return cmd;
            }
        }
    }
}