Skip to content

Commit ac792bf

Browse files
committed
Add version header.
Signed-off-by: Peter Targett <[email protected]>
1 parent 7c58de1 commit ac792bf

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,16 @@ if(OTIO_CXX_INSTALL)
154154
else()
155155
message(STATUS " Not installing header dependencies for C++ (OTIO_DEPENDENCIES_INSTALL=OFF)")
156156
endif()
157+
configure_file(
158+
${PROJECT_SOURCE_DIR}/src/OpenTimelineIO-Version.h.in
159+
${CMAKE_CURRENT_BINARY_DIR}/OpenTimelineIO-Version.h
160+
)
161+
install(
162+
FILES
163+
${CMAKE_CURRENT_BINARY_DIR}/OpenTimelineIO-Version.h
164+
DESTINATION
165+
${OTIO_RESOLVED_CXX_INSTALL_DIR}/include
166+
)
157167
else()
158168
message(STATUS "Install C++ bindings: OFF")
159169
endif()

src/OpenTimelineIO-Version.h.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#define OTIO_VERSION_MAJOR @OpenTimelineIO_VERSION_MAJOR@
2+
#define OTIO_VERSION_MINOR @OpenTimelineIO_VERSION_MINOR@
3+
#define OTIO_VERSION_PATCH @OpenTimelineIO_VERSION_PATCH@
4+
#define OTIO_VERSION @OpenTimelineIO_VERSION@

0 commit comments

Comments
 (0)