|
| 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