-
Notifications
You must be signed in to change notification settings - Fork 428
/
OpenColorABI.h.in
71 lines (58 loc) · 2.53 KB
/
OpenColorABI.h.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.
#ifndef INCLUDED_OCIO_OPENCOLORABI_H
#define INCLUDED_OCIO_OPENCOLORABI_H
// Makefile configuration options
#define OCIO_NAMESPACE @OCIO_NAMESPACE@
#define OCIO_VERSION_STR "@OpenColorIO_VERSION@"
#define OCIO_VERSION_STATUS_STR "@OpenColorIO_VERSION_RELEASE_TYPE@"
#define OCIO_VERSION_FULL_STR "@OpenColorIO_VERSION@@OpenColorIO_VERSION_RELEASE_TYPE@"
// Deprecated synonym for downstream projects that expect the 1.x name
#define OCIO_VERSION "@OpenColorIO_VERSION@"
/* Version as a single 4-byte hex number, e.g. 0x01050200 == 1.5.2
Use this for numeric comparisons, e.g. #if OCIO_VERSION_HEX >= ...
Note: in the case where SOVERSION is overridden at compile-time,
this will reflect the original API version number.
*/
#define OCIO_VERSION_HEX ((@OpenColorIO_VERSION_MAJOR@ << 24) | \
(@OpenColorIO_VERSION_MINOR@ << 16) | \
(@OpenColorIO_VERSION_PATCH@ << 8))
#define OCIO_VERSION_MAJOR @OpenColorIO_VERSION_MAJOR@
#define OCIO_VERSION_MINOR @OpenColorIO_VERSION_MINOR@
// Highlight deprecated methods or classes.
#if defined(_MSC_VER)
#define OCIO_DEPRECATED(msg) __declspec(deprecated(msg))
#elif __cplusplus >= 201402L
#define OCIO_DEPRECATED(msg) [[deprecated(msg)]]
#elif defined(__GNUC__) || defined(__clang__)
#define OCIO_DEPRECATED(msg) __attribute__((deprecated(msg)))
#else
#define OCIO_DEPRECATED(msg) /* unsupported on this platform */
#endif
// shared_ptr / dynamic_pointer_cast
#include <memory>
#define OCIO_SHARED_PTR std::shared_ptr
#define OCIO_DYNAMIC_POINTER_CAST std::dynamic_pointer_cast
// If supported, define OCIOEXPORT, OCIOHIDDEN
// (used to choose which symbols to export from OpenColorIO)
#if defined(_WIN32) || defined(__CYGWIN__)
// Windows requires you to export from the main library and then import in any others
// only when compiling a dynamic library (i.e. DLL)
#ifndef OpenColorIO_SKIP_IMPORTS
#if defined OpenColorIO_EXPORTS
#define OCIOEXPORT __declspec(dllexport)
#else
#define OCIOEXPORT __declspec(dllimport)
#endif
#else
#define OCIOEXPORT
#endif
#define OCIOHIDDEN
#elif defined __GNUC__
#define OCIOEXPORT __attribute__ ((visibility("default")))
#define OCIOHIDDEN __attribute__ ((visibility("hidden")))
#else // Others platforms not supported atm
#define OCIOEXPORT
#define OCIOHIDDEN
#endif
#endif // INCLUDED_OCIO_OPENCOLORABI_H