-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathPackage.swift
32 lines (29 loc) · 1.23 KB
/
Package.swift
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
// swift-tools-version:5.3
import PackageDescription
var package = Package(
name: "ImGui",
products: [
.library(name: "ImGui", targets: ["ImGui"]),
],
targets: [
.target(name: "ImGui", dependencies: ["CImGui"]),
.target(name: "CImGui",
path: "Sources/CImGui",
cSettings: [.define("CIMGUI_DEFINE_ENUMS_AND_STRUCTS")],
cxxSettings: [.define("CIMGUI_DEFINE_ENUMS_AND_STRUCTS")],
linkerSettings: [.linkedLibrary("m", .when(platforms: [.linux]))]),
.target(name: "AutoWrapper",
resources: [
.copy("Assets/definitions.json"),
]),
.testTarget(name: "ImGuiTests", dependencies: ["ImGui"]),
],
cLanguageStandard: .c11,
cxxLanguageStandard: .cxx11
)
package.products.append(.executable(name: "DemoMinimal", targets: ["DemoMinimal"]))
package.targets.append(.target(name: "DemoMinimal", dependencies: ["ImGui"], path: "Sources/Demos/Minimal"))
#if canImport(Metal) && os(macOS)
package.products.append(.executable(name: "DemoMetal-macOS", targets: ["DemoMetal"]))
package.targets.append(.target(name: "DemoMetal", dependencies: ["ImGui"], path: "Sources/Demos/Metal"))
#endif