aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/env-merging/env-merging.qbs
blob: eb681f36befc15ad2c5a56d14ef58f100dbc7a5a (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
import qbs.Host

Project {
    CppApplication {
        name: "tool"
        files: "main.c"
    }

    Product {
        condition: {
            var result = qbs.targetPlatform === Host.platform();
            if (!result)
                console.info("targetPlatform differs from hostPlatform");
            return result;
        }
        name: "p"
        type: "custom"
        Depends { name: "tool" }
        Rule {
            inputsFromDependencies: "application"
            outputFileTags: "custom"
            prepare: {
                var cmd = new Command(input.filePath, []);
                cmd.description = "running tool";
                cmd.environment = ["PATH=/opt/tool/bin"];
                return cmd;
            }
        }
    }
}