Skip to content

Commit 0c4ff16

Browse files
committed
Fixes for the C++ exports
Signed-off-by: Darby Johnston <[email protected]>
1 parent 8fe0e05 commit 0c4ff16

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ option(OTIO_FIND_RAPIDJSON "Find RapidJSON using find_package" OFF)
3636
set(OTIO_PYTHON_INSTALL_DIR "" CACHE STRING "Python installation dir (such as the site-packages dir)")
3737

3838
# Build options
39+
#
40+
# If you are building OpenTimelineIO as a static library you will need to
41+
# defined OPENTIME_STATIC and OTIO_STATIC. If you use the provided CMake
42+
# config files these will be automatically defined for you. To use the
43+
# provided config files add `find_package(OpenTimelineIO)` to your
44+
# CMakeLists.txt file.
45+
#
3946
option(OTIO_SHARED_LIBS "Build shared if ON, static if OFF" ON)
4047
option(OTIO_CXX_COVERAGE "Invoke code coverage if lcov/gcov is available" OFF)
4148
option(OTIO_CXX_EXAMPLES "Build CXX examples (also requires OTIO_PYTHON_INSTALL=ON)" OFF)

src/opentime/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ set_target_properties(opentime PROPERTIES
2828
LIBRARY_OUTPUT_NAME "opentime"
2929
POSITION_INDEPENDENT_CODE TRUE)
3030

31-
if(BUILD_SHARED_LIBS)
31+
if(OTIO_SHARED_LIBS)
3232
set_target_properties(opentime PROPERTIES
3333
SOVERSION ${OTIO_SOVERSION}
3434
VERSION ${OTIO_VERSION})

src/opentime/export.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
# define OPENTIMELINIO_IMPORT __attribute__((dllimport))
1212
# define OPENTIMELINIO_HIDDEN
1313
# define OPENTIMELINIO_EXPORT_TYPE
14+
# define OPENTIMELINIO_IMPORT_TYPE
1415
# else
1516
# define OPENTIMELINIO_EXPORT __declspec(dllexport)
1617
# define OPENTIMELINIO_IMPORT __declspec(dllimport)
1718
# define OPENTIMELINIO_HIDDEN
1819
# define OPENTIMELINIO_EXPORT_TYPE
20+
# define OPENTIMELINIO_IMPORT_TYPE
1921
# endif
2022
#elif defined(__GNUC__) && __GNUC__ >= 4 || defined(__clang__)
2123
# define OPENTIMELINIO_EXPORT __attribute__((visibility("default")))
@@ -26,11 +28,13 @@
2628
# else
2729
# define OPENTIMELINIO_EXPORT_TYPE __attribute__((visibility("default")))
2830
# endif
31+
# define OPENTIMELINIO_IMPORT_TYPE
2932
#else
3033
# define OPENTIMELINIO_EXPORT
3134
# define OPENTIMELINIO_IMPORT
3235
# define OPENTIMELINIO_HIDDEN
3336
# define OPENTIMELINIO_EXPORT_TYPE
37+
# define OPENTIMELINIO_IMPORT_TYPE
3438
#endif
3539
#define OPENTIMELINIO_EXPORT_TEMPLATE(type, ...)
3640
#define OPENTIMELINIO_IMPORT_TEMPLATE(type, ...) \

src/opentimelineio/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ set_target_properties(opentimelineio PROPERTIES
103103
LIBRARY_OUTPUT_NAME "opentimelineio"
104104
POSITION_INDEPENDENT_CODE TRUE)
105105

106-
if(BUILD_SHARED_LIBS)
106+
if(OTIO_SHARED_LIBS)
107107
set_target_properties(opentimelineio PROPERTIES
108108
SOVERSION ${OTIO_SOVERSION}
109109
VERSION ${OTIO_VERSION})

0 commit comments

Comments
 (0)