Skip to content

Commit 5fc1040

Browse files
furby-tmjminor
authored andcommitted
Support swift 5.9 with minimum 5.5 compatibility.
Signed-off-by: furby™ <[email protected]>
1 parent 963be93 commit 5fc1040

File tree

2 files changed

+83
-4
lines changed

2 files changed

+83
-4
lines changed

Package.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.5
1+
// swift-tools-version:5.9
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33
//
44
// SPDX-License-Identifier: Apache-2.0
@@ -8,8 +8,11 @@ import PackageDescription
88

99
let package = Package(
1010
name: "OpenTimelineIO",
11-
platforms: [.macOS(.v10_13),
12-
.iOS(.v11)],
11+
platforms: [
12+
.macOS(.v10_13),
13+
.iOS(.v12),
14+
.visionOS(.v1)
15+
],
1316
products: [
1417
.library(name: "OpenTime_CXX", targets: ["OpenTime_CXX"]),
1518
.library(name: "OpenTimelineIO_CXX", targets: ["OpenTimelineIO_CXX"]),
@@ -72,5 +75,5 @@ let package = Package(
7275
sources: ["OpenTimelineIOTests"],
7376
resources: [ .copy("data") ])
7477
],
75-
cxxLanguageStandard: CXXLanguageStandard.cxx17
78+
cxxLanguageStandard: .cxx17
7679
)

[email protected]

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
// swift-tools-version:5.5
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
//
4+
// SPDX-License-Identifier: Apache-2.0
5+
// Copyright Contributors to the OpenTimelineIO project
6+
7+
import PackageDescription
8+
9+
let package = Package(
10+
name: "OpenTimelineIO",
11+
platforms: [.macOS(.v10_13),
12+
.iOS(.v11)],
13+
products: [
14+
.library(name: "OpenTime_CXX", targets: ["OpenTime_CXX"]),
15+
.library(name: "OpenTimelineIO_CXX", targets: ["OpenTimelineIO_CXX"]),
16+
.library(name: "OpenTimelineIO", targets: ["OpenTimelineIO"])
17+
],
18+
19+
dependencies: [],
20+
targets: [
21+
.target(name: "otio_header_root",
22+
path: ".",
23+
exclude: [
24+
"CONTRIBUTORS.md", "NOTICE.txt", "CONTRIBUTING.md", "LICENSE.txt", "CODE_OF_CONDUCT.md",
25+
"OTIO_CLA_Corporate.pdf", "OTIO_CLA_Individual.pdf",
26+
"README.md", "Examples", "OpenTimelineIO", "Tests", "Sources/objc", "Sources/swift"],
27+
sources: ["Sources/shims/otio_header_root-shim.cpp"],
28+
publicHeadersPath:"OpenTimelineIO/src"),
29+
30+
.target(name: "OpenTime_CXX",
31+
dependencies: ["otio_header_root"],
32+
path: "OpenTimelineIO/src/opentime",
33+
exclude: ["CMakeLists.txt", "OpenTimeConfig.cmake.in"],
34+
sources: ["."],
35+
publicHeadersPath: ".",
36+
cxxSettings: [ .headerSearchPath(".")]),
37+
38+
.target(name: "OpenTimelineIO_CXX",
39+
dependencies: ["OpenTime_CXX"],
40+
path: "OpenTimelineIO/src/opentimelineio",
41+
exclude: ["CMakeLists.txt", "CORE_VERSION_MAP.last.cpp", "OpenTimelineIOConfig.cmake.in"],
42+
sources: ["."],
43+
publicHeadersPath: ".",
44+
cxxSettings: [
45+
.headerSearchPath("."),
46+
.headerSearchPath("../deps/any/"),
47+
.headerSearchPath("../deps/Imath/src/Imath"),
48+
.headerSearchPath("../../../Sources/cpp"),
49+
.headerSearchPath("../deps/rapidjson/include")]),
50+
51+
.target(name: "OpenTimelineIO_objc",
52+
dependencies: ["OpenTimelineIO_CXX"],
53+
path: "Sources",
54+
exclude: ["swift", "shims"],
55+
sources: ["objc"],
56+
publicHeadersPath: "objc/include",
57+
cxxSettings: [
58+
.headerSearchPath("../OpenTimelineIO/src/deps/Imath/src/Imath"),
59+
.headerSearchPath("../Sources/cpp"),
60+
.headerSearchPath("objc/include")]),
61+
62+
// public target
63+
.target(name: "OpenTimelineIO",
64+
dependencies: ["OpenTimelineIO_objc"],
65+
path: "Sources",
66+
exclude: ["objc", "shims"],
67+
sources: ["swift"]),
68+
69+
.testTarget(name: "OpenTimelineIOTests",
70+
dependencies: ["OpenTimelineIO"],
71+
path: "Tests",
72+
sources: ["OpenTimelineIOTests"],
73+
resources: [ .copy("data") ])
74+
],
75+
cxxLanguageStandard: .cxx17
76+
)

0 commit comments

Comments
 (0)