aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/protobuf-library-install/protobuf-library.qbs
blob: e69ab84083cb40fd1382416c91fdd0dc43e97f28 (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
import qbs

StaticLibrary {
    condition: {
        var result = qbs.targetPlatform === qbs.hostPlatform;
        if (!result)
            console.info("targetPlatform differs from hostPlatform");
        return result && hasProtobuf;
    }

    Depends { name: "cpp" }
    cpp.cxxLanguageVersion: "c++11"
    cpp.minimumMacosVersion: "10.8"

    protobuf.cpp.importPaths: product.sourceDirectory

    Depends { name: "protobuf.cpp"; required: false }
    property bool hasProtobuf: {
        console.info("has protobuf: " + protobuf.cpp.present);
        return protobuf.cpp.present;
    }

    Group {
        fileTagsFilter: "protobuf.hpp"
        qbs.installDir: "include"
        qbs.installSourceBase: protobuf.cpp.outputDir
        qbs.install: true
    }

    files: [
        "hello.proto",
        "hello/world.proto",
    ]
}