blob: 3d0d7471a44cd646e6146247d64b59ab5a0b2181 (
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
|
import qbs 1.0
import qbs.FileInfo
import QtcFunctions
Product {
type: ["dynamiclibrary", "pluginSpec"]
property var pluginspecreplacements
property var pluginRecommends: []
Depends { name: "Qt.core" }
property string minimumQtVersion: "4.8"
condition: QtcFunctions.versionIsAtLeast(Qt.core.version, minimumQtVersion)
targetName: QtcFunctions.qtLibraryName(qbs, name)
destinationDirectory: project.ide_plugin_path
Depends { name: "ExtensionSystem" }
Depends { name: "pluginspec" }
Depends { name: "cpp" }
Depends {
condition: project.testsEnabled
name: "Qt.test"
}
cpp.defines: project.generalDefines.concat([name.toUpperCase() + "_LIBRARY"])
cpp.installNamePrefix: "@rpath/PlugIns/"
cpp.rpaths: qbs.targetOS.contains("osx") ? ["@loader_path/..", "@executable_path/.."]
: ["$ORIGIN", "$ORIGIN/.."]
cpp.cxxFlags: QtcFunctions.commonCxxFlags(qbs)
cpp.linkerFlags: {
var flags = QtcFunctions.commonLinkerFlags(qbs);
if (qbs.buildVariant == "release" && (qbs.toolchain.contains("gcc") || qbs.toolchain.contains("mingw")))
flags.push("-Wl,-s");
else 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]
cpp.minimumOsxVersion: "10.7"
cpp.minimumWindowsVersion: qbs.architecture === "x86" ? "5.1" : "5.2"
Group {
name: "PluginSpec"
files: [ product.name + ".pluginspec.in" ]
fileTags: ["pluginSpecIn"]
}
Group {
name: "MimeTypes"
files: [ "*.mimetypes.xml" ]
}
Group {
fileTagsFilter: product.type
qbs.install: true
qbs.installDir: project.ide_plugin_path
}
Export {
Depends { name: "ExtensionSystem" }
Depends { name: "cpp" }
cpp.includePaths: [pluginIncludeBase]
}
}
|