|
6 | 6 | // For an explanation of how these export defines work, see: |
7 | 7 | // https://github.com/PixarAnimationStudios/OpenUSD/blob/dev/pxr/base/arch/export.h |
8 | 8 | #if defined(_WINDOWS) |
9 | | -# if defined(__GNUC__) && __GNUC__ >= 4 || defined(__clang__) |
10 | | -# define OPENTIMELINEIO_EXPORT __attribute__((dllexport)) |
11 | | -# define OPENTIMELINEIO_IMPORT __attribute__((dllimport)) |
12 | | -# define OPENTIMELINEIO_HIDDEN |
13 | | -# define OPENTIMELINEIO_EXPORT_TYPE |
14 | | -# define OPENTIMELINEIO_IMPORT_TYPE |
15 | | -# else |
16 | | -# define OPENTIMELINEIO_EXPORT __declspec(dllexport) |
17 | | -# define OPENTIMELINEIO_IMPORT __declspec(dllimport) |
18 | | -# define OPENTIMELINEIO_HIDDEN |
19 | | -# define OPENTIMELINEIO_EXPORT_TYPE |
20 | | -# define OPENTIMELINEIO_IMPORT_TYPE |
21 | | -# endif |
| 9 | +# if defined(__GNUC__) && __GNUC__ >= 4 || defined(__clang__) |
| 10 | +# define OPENTIMELINEIO_EXPORT __attribute__((dllexport)) |
| 11 | +# define OPENTIMELINEIO_IMPORT __attribute__((dllimport)) |
| 12 | +# define OPENTIMELINEIO_HIDDEN |
| 13 | +# define OPENTIMELINEIO_EXPORT_TYPE |
| 14 | +# define OPENTIMELINEIO_IMPORT_TYPE |
| 15 | +# else |
| 16 | +# define OPENTIMELINEIO_EXPORT __declspec(dllexport) |
| 17 | +# define OPENTIMELINEIO_IMPORT __declspec(dllimport) |
| 18 | +# define OPENTIMELINEIO_HIDDEN |
| 19 | +# define OPENTIMELINEIO_EXPORT_TYPE |
| 20 | +# define OPENTIMELINEIO_IMPORT_TYPE |
| 21 | +# endif |
22 | 22 | #elif defined(__GNUC__) && __GNUC__ >= 4 || defined(__clang__) |
23 | | -# define OPENTIMELINEIO_EXPORT __attribute__((visibility("default"))) |
24 | | -# define OPENTIMELINEIO_IMPORT |
25 | | -# define OPENTIMELINEIO_HIDDEN __attribute__((visibility("hidden"))) |
26 | | -# if defined(__clang__) |
27 | | -# define OPENTIMELINEIO_EXPORT_TYPE __attribute__((type_visibility("default"))) |
28 | | -# else |
29 | | -# define OPENTIMELINEIO_EXPORT_TYPE __attribute__((visibility("default"))) |
30 | | -# endif |
31 | | -# define OPENTIMELINEIO_IMPORT_TYPE |
| 23 | +# define OPENTIMELINEIO_EXPORT __attribute__((visibility("default"))) |
| 24 | +# define OPENTIMELINEIO_IMPORT |
| 25 | +# define OPENTIMELINEIO_HIDDEN __attribute__((visibility("hidden"))) |
| 26 | +# if defined(__clang__) |
| 27 | +# define OPENTIMELINEIO_EXPORT_TYPE \ |
| 28 | + __attribute__((type_visibility("default"))) |
| 29 | +# else |
| 30 | +# define OPENTIMELINEIO_EXPORT_TYPE \ |
| 31 | + __attribute__((visibility("default"))) |
| 32 | +# endif |
| 33 | +# define OPENTIMELINEIO_IMPORT_TYPE |
32 | 34 | #else |
33 | | -# define OPENTIMELINEIO_EXPORT |
34 | | -# define OPENTIMELINEIO_IMPORT |
35 | | -# define OPENTIMELINEIO_HIDDEN |
36 | | -# define OPENTIMELINEIO_EXPORT_TYPE |
37 | | -# define OPENTIMELINEIO_IMPORT_TYPE |
| 35 | +# define OPENTIMELINEIO_EXPORT |
| 36 | +# define OPENTIMELINEIO_IMPORT |
| 37 | +# define OPENTIMELINEIO_HIDDEN |
| 38 | +# define OPENTIMELINEIO_EXPORT_TYPE |
| 39 | +# define OPENTIMELINEIO_IMPORT_TYPE |
38 | 40 | #endif |
39 | 41 | #define OPENTIMELINEIO_EXPORT_TEMPLATE(type, ...) |
40 | | -#define OPENTIMELINEIO_IMPORT_TEMPLATE(type, ...) \ |
| 42 | +#define OPENTIMELINEIO_IMPORT_TEMPLATE(type, ...) \ |
41 | 43 | extern template type OPENTIMELINEIO_IMPORT __VA_ARGS__ |
42 | 44 |
|
43 | 45 | #if defined(OPENTIME_STATIC) |
44 | | -# define OPENTIME_API |
45 | | -# define OPENTIME_API_TYPE |
46 | | -# define OPENTIME_API_TEMPLATE_CLASS(...) |
47 | | -# define OPENTIME_API_TEMPLATE_STRUCT(...) |
48 | | -# define OPENTIME_LOCAL |
| 46 | +# define OPENTIME_API |
| 47 | +# define OPENTIME_API_TYPE |
| 48 | +# define OPENTIME_API_TEMPLATE_CLASS(...) |
| 49 | +# define OPENTIME_API_TEMPLATE_STRUCT(...) |
| 50 | +# define OPENTIME_LOCAL |
49 | 51 | #else |
50 | | -# if defined(OPENTIME_EXPORTS) |
51 | | -# define OPENTIME_API OPENTIMELINEIO_EXPORT |
52 | | -# define OPENTIME_API_TYPE OPENTIMELINEIO_EXPORT_TYPE |
53 | | -# define OPENTIME_API_TEMPLATE_CLASS(...) \ |
| 52 | +# if defined(OPENTIME_EXPORTS) |
| 53 | +# define OPENTIME_API OPENTIMELINEIO_EXPORT |
| 54 | +# define OPENTIME_API_TYPE OPENTIMELINEIO_EXPORT_TYPE |
| 55 | +# define OPENTIME_API_TEMPLATE_CLASS(...) \ |
54 | 56 | OPENTIMELINEIO_EXPORT_TEMPLATE(class, __VA_ARGS__) |
55 | | -# define OPENTIME_API_TEMPLATE_STRUCT(...) \ |
| 57 | +# define OPENTIME_API_TEMPLATE_STRUCT(...) \ |
56 | 58 | OPENTIMELINEIO_EXPORT_TEMPLATE(struct, __VA_ARGS__) |
57 | | -# else |
58 | | -# define OPENTIME_API OPENTIMELINEIO_IMPORT |
59 | | -# define OPENTIME_API_TYPE OPENTIMELINEIO_IMPORT_TYPE |
60 | | -# define OPENTIME_API_TEMPLATE_CLASS(...) \ |
| 59 | +# else |
| 60 | +# define OPENTIME_API OPENTIMELINEIO_IMPORT |
| 61 | +# define OPENTIME_API_TYPE OPENTIMELINEIO_IMPORT_TYPE |
| 62 | +# define OPENTIME_API_TEMPLATE_CLASS(...) \ |
61 | 63 | OPENTIMELINEIO_IMPORT_TEMPLATE(class, __VA_ARGS__) |
62 | | -# define OPENTIME_API_TEMPLATE_STRUCT(...) \ |
| 64 | +# define OPENTIME_API_TEMPLATE_STRUCT(...) \ |
63 | 65 | OPENTIMELINEIO_IMPORT_TEMPLATE(struct, __VA_ARGS__) |
64 | | -# endif |
65 | | -# define OPENTIME_LOCAL OPENTIMELINEIO_HIDDEN |
| 66 | +# endif |
| 67 | +# define OPENTIME_LOCAL OPENTIMELINEIO_HIDDEN |
66 | 68 | #endif |
0 commit comments