aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/api/testdata/tool-in-module/use-within-project/use-within-project.qbs
blob: bbeb29664223225cf7b8514abd153b8c15c823ee (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
import qbs

Project {
    CppApplication {
        name: "thetool"
        consoleApplication: true
        files: "main.cpp"

        install: true
        installDir: ""
        qbs.installPrefix: ""
        Group {
            fileTagsFilter: ["application"]
            fileTags: ["thetool.thetool"]
        }

        Export {
            Depends { name: "cpp" }
            Rule {
                multiplex: true
                explicitlyDependsOnFromDependencies: ["thetool.thetool"]
                Artifact {
                    filePath: "tool-output.txt"
                    fileTags: ["thetool.output"]
                }
                prepare: {
                    var cmd = new Command(explicitlyDependsOn["thetool.thetool"][0].filePath,
                                          output.filePath);
                    cmd.description = "running the tool";
                    return [cmd];
                }
            }
        }
    }

    Product {
        name: "user-in-project"
        type: ["thetool.output"]
        Depends { name: "thetool" }
    }
}