aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/qbspkgconfig-module-provider/libs/libs.qbs
blob: b473083c6f390d545df64fd126f78aa48cd3c96a (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
import qbs.FileInfo

Project {
    property bool isBundle: false

    DynamicLibrary {
        Depends { name: "cpp" }
        Depends { name: "bundle" }
        Depends { name: "Exporter.pkgconfig" }
        Exporter.pkgconfig.versionEntry: "1.0"
        name: "libA"
        bundle.isBundle: project.isBundle
        bundle.publicHeaders: ["libA.h"]
        files: "libA.cpp"
        cpp.defines: {
            var result = [];
            if (project.isBundle)
                result.push("MYLIB_FRAMEWORK");
            return result;
        }
        qbs.installPrefix: "/usr"
        install: true
        installImportLib: true
        installDir: "lib"
        Group {
            files: ["libA.h"]
            qbs.install: !project.isBundle
            qbs.installDir: FileInfo.joinPaths("include", product.name)
        }
        Group {
            fileTagsFilter: ["Exporter.pkgconfig.pc"]
            qbs.install: !project.isBundle
            qbs.installDir: FileInfo.joinPaths("share", "pkgconfig")
        }
        Export {
            Depends { name: "cpp" }
            cpp.defines: ["THE_MAGIC_DEFINE"]
            cpp.includePaths: [FileInfo.joinPaths(exportingProduct.qbs.installPrefix, "include")]
            cpp.libraryPaths: [FileInfo.joinPaths(exportingProduct.qbs.installPrefix, "lib")]
        }
    }
}