|
41 | 41 | #include <cassert>
|
42 | 42 | #include <cstddef>
|
43 | 43 |
|
44 |
| -#ifdef OZZ_USE_DYNAMIC_LINKING |
45 |
| - #ifdef OZZ_BUILD_BASE_LIB |
46 |
| - // export for dynamic linking while building ozz |
47 |
| - #define OZZ_BASE_DLL __declspec(dllexport) |
48 |
| - #else |
49 |
| - // import for dynamic linking when just using ozz |
50 |
| - #define OZZ_BASE_DLL __declspec(dllimport) |
51 |
| - #endif() |
| 44 | +#if defined(_MSC_VER) && defined(OZZ_USE_DYNAMIC_LINKING) |
| 45 | + |
| 46 | +#ifdef OZZ_BUILD_BASE_LIB |
| 47 | +// export for dynamic linking while building ozz |
| 48 | +#define OZZ_BASE_DLL __declspec(dllexport) |
52 | 49 | #else
|
53 |
| - // static linking |
54 |
| - #define OZZ_BASE_DLL |
| 50 | +// import for dynamic linking when just using ozz |
| 51 | +#define OZZ_BASE_DLL __declspec(dllimport) |
55 | 52 | #endif
|
56 | 53 |
|
57 |
| -#ifdef OZZ_USE_DYNAMIC_LINKING |
58 |
| - #ifdef OZZ_BUILD_ANIMATION_LIB |
59 |
| - // export for dynamic linking while building ozz |
60 |
| - #define OZZ_ANIMATION_DLL __declspec(dllexport) |
61 |
| - #else |
62 |
| - // import for dynamic linking when just using ozz |
63 |
| - #define OZZ_ANIMATION_DLL __declspec(dllimport) |
64 |
| - #endif() |
| 54 | +#ifdef OZZ_BUILD_ANIMATION_LIB |
| 55 | +// export for dynamic linking while building ozz |
| 56 | +#define OZZ_ANIMATION_DLL __declspec(dllexport) |
65 | 57 | #else
|
66 |
| - // static linking |
67 |
| - #define OZZ_ANIMATION_DLL |
| 58 | +// import for dynamic linking when just using ozz |
| 59 | +#define OZZ_ANIMATION_DLL __declspec(dllimport) |
68 | 60 | #endif
|
69 | 61 |
|
70 |
| -#ifdef OZZ_USE_DYNAMIC_LINKING |
71 |
| - #ifdef OZZ_BUILD_ANIMOFFLINE_LIB |
72 |
| - // export for dynamic linking while building ozz |
73 |
| - #define OZZ_ANIMOFFLINE_DLL __declspec(dllexport) |
74 |
| - #else |
75 |
| - // import for dynamic linking when just using ozz |
76 |
| - #define OZZ_ANIMOFFLINE_DLL __declspec(dllimport) |
77 |
| - #endif() |
| 62 | +#ifdef OZZ_BUILD_ANIMOFFLINE_LIB |
| 63 | +// export for dynamic linking while building ozz |
| 64 | +#define OZZ_ANIMOFFLINE_DLL __declspec(dllexport) |
78 | 65 | #else
|
79 |
| - // static linking |
80 |
| - #define OZZ_ANIMOFFLINE_DLL |
| 66 | +// import for dynamic linking when just using ozz |
| 67 | +#define OZZ_ANIMOFFLINE_DLL __declspec(dllimport) |
81 | 68 | #endif
|
82 | 69 |
|
83 |
| -#ifdef OZZ_USE_DYNAMIC_LINKING |
84 |
| - #ifdef OZZ_BUILD_ANIMATIONTOOLS_LIB |
85 |
| - // export for dynamic linking while building ozz |
86 |
| - #define OZZ_ANIMTOOLS_DLL __declspec(dllexport) |
87 |
| - #else |
88 |
| - // import for dynamic linking when just using ozz |
89 |
| - #define OZZ_ANIMTOOLS_DLL __declspec(dllimport) |
90 |
| - #endif() |
| 70 | +#ifdef OZZ_BUILD_ANIMATIONTOOLS_LIB |
| 71 | +// export for dynamic linking while building ozz |
| 72 | +#define OZZ_ANIMTOOLS_DLL __declspec(dllexport) |
91 | 73 | #else
|
92 |
| - // static linking |
93 |
| - #define OZZ_ANIMTOOLS_DLL |
| 74 | +// import for dynamic linking when just using ozz |
| 75 | +#define OZZ_ANIMTOOLS_DLL __declspec(dllimport) |
94 | 76 | #endif
|
95 | 77 |
|
| 78 | +#else // defined(_MSC_VER) && defined(OZZ_USE_DYNAMIC_LINKING) |
| 79 | + |
| 80 | +// static linking |
| 81 | +#define OZZ_BASE_DLL |
| 82 | +#define OZZ_ANIMATION_DLL |
| 83 | +#define OZZ_ANIMOFFLINE_DLL |
| 84 | +#define OZZ_ANIMTOOLS_DLL |
| 85 | + |
| 86 | +#endif // defined(_MSC_VER) && defined(OZZ_USE_DYNAMIC_LINKING) |
| 87 | + |
96 | 88 | namespace ozz {
|
97 | 89 |
|
98 | 90 | // Finds the number of elements of a statically allocated array.
|
|
0 commit comments