aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/api/testdata/tool-in-module/use-outside-project/modules/thetool/thetool.qbs
blob: 9521f3ae4bc7bef1b86bc900ac65981fcd3fad87 (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
import qbs
import qbs.FileInfo

Module {
    Depends { name: "cpp" }
    Group {
        name: "thetool binary"
        files: FileInfo.cleanPath(FileInfo.joinPaths(path, "..", "..",
                   "thetool" + (qbs.hostOS.contains("windows") ? ".exe" : "")));
        fileTags: ["thetool.thetool"]
        filesAreTargets: true
    }

    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];
        }
    }
}