aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/importing-product/importing-product.qbs
blob: e81f760775c8daea6962ac1224491674aeb3aec6 (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
import qbs
import qbs.File

Project {
    Product {
        name: "dep"

        Export {
            Depends { name: "cpp" }
            cpp.includePaths: [importingProduct.buildDirectory + "/random_dir"]

            Rule {
                inputs: ["hpp_in"]
                Artifact {
                    filePath: product.buildDirectory + "/random_dir/" + input.completeBaseName
                    fileTags: ["hpp"]
                }
                prepare: {
                    var cmd = new JavaScriptCommand();
                    cmd.description = "Copying file";
                    cmd.sourceCode = function() {
                        File.copy(input.filePath, output.filePath);
                    }
                    return [cmd];
                }
            }
        }
    }

    CppApplication {
        name: "theProduct"
        Depends { name: "dep" }
        Group {
            files: ["header.h.in"]
            fileTags: ["hpp_in"]
        }
        files: ["main.cpp"]
    }

    CppApplication {
        name: "theProduct2"
        Depends { name: "dep" }
    }
}