-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathTiledPlugin.qbs
54 lines (49 loc) · 1.39 KB
/
TiledPlugin.qbs
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
import qbs 1.0
DynamicLibrary {
Depends { name: "libtiled" }
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: "gui" }
cpp.cxxLanguageVersion: "c++17"
cpp.cxxFlags: {
var flags = base;
if (qbs.toolchain.contains("msvc")) {
if (Qt.core.versionMajor >= 6 && Qt.core.versionMinor >= 3)
flags.push("/permissive-");
}
return flags;
}
cpp.visibility: "minimal"
cpp.useRPaths: project.useRPaths
cpp.rpaths: {
if (qbs.targetOS.contains("darwin"))
return ["@loader_path/../Frameworks"];
else
return ["$ORIGIN/../.."];
}
cpp.defines: [
"QT_DISABLE_DEPRECATED_BEFORE=QT_VERSION_CHECK(5,15,0)",
"QT_NO_DEPRECATED_WARNINGS",
"QT_NO_FOREACH",
"QT_NO_URL_CAST_FROM_STRING"
]
Properties {
condition: qbs.targetOS.contains("macos")
bundle.isBundle: false
}
Group {
qbs.install: true
qbs.installDir: {
if (project.windowsLayout)
return "plugins/tiled"
else if (qbs.targetOS.contains("macos"))
return "Tiled.app/Contents/PlugIns"
else
return "lib/tiled/plugins"
}
fileTagsFilter: "dynamiclibrary"
}
FileTagger {
patterns: "plugin.json"
fileTags: ["qt_plugin_metadata"]
}
}