aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/plugin-dependency/plugin-dependency.qbs
blob: 30b7f4ace10f491525588cafc2fc203b9d6b2456 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import qbs.Host

Project {
    CppApplication {
        name: "myapp"
        files: ["main.cpp"]
        Depends {
            name: "plugin1"                             // not to be linked
            cpp.link: Host.os() === undefined
        }
        Depends { name: "plugin2" }                     // not to be linked
        Depends {
            name: "plugin3"                             // supposed to be linked
            //property bool theCondition: true
            cpp.link: /*theCondition && */product.name === "myapp"  // TODO: Make this work
        }
        Depends { name: "plugin4" }                     // supposed to be linked
        Depends { name: "helper1" }                     // supposed to be linked
    }
    DynamicLibrary {
        name: "plugin1"
        files: ["plugin1.cpp"]
        Depends { name: "cpp" }
    }
    DynamicLibrary {
        name: "plugin2"
        files: ["plugin2.cpp"]
        Depends { name: "cpp" }
        Export {
            Parameters {
                cpp.link: false // marker 1
            }
        }
    }
    DynamicLibrary {
        name: "plugin3"
        files: ["plugin3.cpp"]
        Depends { name: "cpp" }
        Export {
            Parameters {
                cpp.link: false
            }
        }
    }
    DynamicLibrary {
        name: "plugin4"
        files: ["plugin4.cpp"]
        Depends { name: "cpp" }
        Export {
            Parameters {
                // property bool theCondition: true
                cpp.link: true // theCondition TODO: Make this work
            }
        }
    }
    DynamicLibrary {
        name: "helper1"
        files: ["helper1.cpp"]
        Depends { name: "cpp" }
        Depends { name: "helper2"; cpp.link: false /* marker 2 */ }
        Export {
            Depends { name: "cpp" }
            Depends { name: "helper2"; cpp.link: false }
        }
    }
    DynamicLibrary {
        name: "helper2"
        files: ["helper2.cpp"]
        Depends { name: "cpp" }
        Export {
            Depends { name: "cpp" }
            cpp.defines: ["USING_HELPER2"]
        }
    }
}