QtcPlugin.qbs 1.15 KB
Newer Older
Joerg Bornemann's avatar
Joerg Bornemann committed
1
2
import qbs.base 1.0
import qbs.fileinfo 1.0 as FileInfo
3
import "../../qbs/defaults.js" as Defaults
Joerg Bornemann's avatar
Joerg Bornemann committed
4
5
6

Product {
    type: ["dynamiclibrary", "pluginSpec"]
7
    property string provider: 'QtProject'
Daniel Teske's avatar
Daniel Teske committed
8
    property var pluginspecreplacements
9
    destination: "lib/qtcreator/plugins/" + provider
10
11
12
13
14
15
16
17
18
19
20
21
    targetName: {
        // see PluginSpecPrivate::loadLibrary()
        if (qbs.debugInformation) {
            switch (qbs.targetOS) {
            case "windows":
                return name + "d";
            case "mac":
                return name + "_debug";
            }
        }
        return name;
    }
Joerg Bornemann's avatar
Joerg Bornemann committed
22
23

    Depends { name: "pluginspec" }
24
    Depends { name: "cpp" }
25
26
27
28
29
30
    Depends {
        condition: Defaults.testsEnabled(qbs)
        name: "Qt.test"
    }

    cpp.defines: Defaults.defines(qbs).concat([name.toUpperCase() + "_LIBRARY"])
Joerg Bornemann's avatar
Joerg Bornemann committed
31
    cpp.rpaths: ["$ORIGIN/../../.."]
32
33
34
35
    cpp.linkerFlags: {
        if (qbs.buildVariant == "release" && (qbs.toolchain == "gcc" || qbs.toolchain == "mingw"))
            return ["-Wl,-s"]
    }
36
    cpp.includePaths: [ ".", ".." ]
Joerg Bornemann's avatar
Joerg Bornemann committed
37
38

    Group {
39
        files: [ product.name + ".pluginspec.in" ]
Joerg Bornemann's avatar
Joerg Bornemann committed
40
41
42
        fileTags: ["pluginSpecIn"]
    }
}