Skip to content

Commit 0acd64b

Browse files
committed
Added pre-made version.h files and header search paths to find them.
Signed-off-by: Joshua Minor <jminor@users.noreply.github.com>
1 parent 5bbcc70 commit 0acd64b

File tree

3 files changed

+50
-3
lines changed

3 files changed

+50
-3
lines changed

Package.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ let package = Package(
3636
exclude: ["CMakeLists.txt", "OpenTimeConfig.cmake.in", "version.h.in"],
3737
sources: ["."],
3838
publicHeadersPath: ".",
39-
cxxSettings: [ .headerSearchPath(".")]),
39+
cxxSettings: [
40+
.headerSearchPath("."),
41+
.headerSearchPath("../../../Sources/cpp")]),
4042

4143
.target(name: "OpenTimelineIO_CXX",
4244
dependencies: ["OpenTime_CXX"],
@@ -47,7 +49,7 @@ let package = Package(
4749
cxxSettings: [
4850
.headerSearchPath("."),
4951
.headerSearchPath("../deps/any/"),
50-
.headerSearchPath("../deps/Imath/src/Imath"),
52+
.headerSearchPath("../deps/Imath/src"),
5153
.headerSearchPath("../../../Sources/cpp"),
5254
.headerSearchPath("../deps/rapidjson/include")]),
5355

@@ -58,7 +60,7 @@ let package = Package(
5860
sources: ["objc"],
5961
publicHeadersPath: "objc/include",
6062
cxxSettings: [
61-
.headerSearchPath("../OpenTimelineIO/src/deps/Imath/src/Imath"),
63+
.headerSearchPath("../OpenTimelineIO/src/deps/Imath/src"),
6264
.headerSearchPath("../Sources/cpp"),
6365
.headerSearchPath("objc/include")]),
6466

Sources/cpp/opentime/version.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// Copyright Contributors to the OpenTimelineIO project
3+
4+
#pragma once
5+
6+
#define OPENTIME_VERSION_MAJOR 0
7+
#define OPENTIME_VERSION_MINOR 18
8+
#define OPENTIME_VERSION_PATCH 1
9+
#define OPENTIME_VERSION v0_18_1
10+
11+
namespace opentime {
12+
namespace OPENTIME_VERSION {
13+
}
14+
15+
using namespace OPENTIME_VERSION;
16+
} // namespace opentime
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// Copyright Contributors to the OpenTimelineIO project
3+
4+
#pragma once
5+
6+
#define OPENTIMELINEIO_VERSION_MAJOR 0
7+
#define OPENTIMELINEIO_VERSION_MINOR 18
8+
#define OPENTIMELINEIO_VERSION_PATCH 1
9+
#define OPENTIMELINEIO_VERSION v0_18_1
10+
11+
#include "opentime/rationalTime.h"
12+
#include "opentime/timeRange.h"
13+
#include "opentime/timeTransform.h"
14+
#include "opentime/version.h"
15+
16+
namespace opentimelineio { namespace OPENTIMELINEIO_VERSION {
17+
using opentime::RationalTime;
18+
using opentime::TimeRange;
19+
using opentime::TimeTransform;
20+
}} // namespace opentimelineio::OPENTIMELINEIO_VERSION
21+
22+
/// @brief Convenience macro for the full namespace of OpenTimelineIO API.
23+
///
24+
/// This can be used in place of the full namespace, e.g.:
25+
/// <code>
26+
/// OTIO_NS::Track* track = new OTIO_NS::Track;
27+
/// </code>
28+
///
29+
#define OTIO_NS opentimelineio::OPENTIMELINEIO_VERSION

0 commit comments

Comments
 (0)