blob: d896411c90a87dbb44d26ce1b851015a901c7d28 (
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
|
import qbs 1.0
import qbs.FileInfo
import QtcFunctions
import QtcProduct
QtcProduct {
type: ["dynamiclibrary", "pluginSpec"]
installDir: project.ide_plugin_path
property var pluginJsonReplacements
property var pluginRecommends: []
property string minimumQtVersion: "5.3.1"
condition: QtcFunctions.versionIsAtLeast(Qt.core.version, minimumQtVersion)
targetName: QtcFunctions.qtLibraryName(qbs, name)
destinationDirectory: project.ide_plugin_path
Depends { name: "ExtensionSystem" }
Depends { name: "pluginjson" }
Depends {
condition: project.testsEnabled
name: "Qt.test"
}
cpp.defines: base.concat([name.toUpperCase() + "_LIBRARY"])
cpp.installNamePrefix: "@rpath/PlugIns/"
cpp.rpaths: qbs.targetOS.contains("osx")
? ["@loader_path/..", "@loader_path/", "@executable_path/.."]
: ["$ORIGIN", "$ORIGIN/.."]
cpp.linkerFlags: {
var flags = base;
if (qbs.buildVariant == "debug" && qbs.toolchain.contains("msvc"))
flags.push("/INCREMENTAL:NO"); // Speed up startup time when debugging with cdb
return flags;
}
property string pluginIncludeBase: ".." // #include <plugin/header.h>
cpp.includePaths: [pluginIncludeBase]
Group {
name: "PluginMetaData"
files: [ product.name + ".json.in" ]
fileTags: ["pluginJsonIn"]
}
Group {
name: "MimeTypes"
files: [ "*.mimetypes.xml" ]
}
Export {
Depends { name: "ExtensionSystem" }
Depends { name: "cpp" }
cpp.includePaths: [pluginIncludeBase]
}
}
|