forked from AcademySoftwareFoundation/openexr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenEXRConfig.h.in
182 lines (152 loc) · 6.38 KB
/
OpenEXRConfig.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) Contributors to the OpenEXR Project.
// This file is auto-generated by the configure step
#ifndef INCLUDED_OPENEXR_CONFIG_H
#define INCLUDED_OPENEXR_CONFIG_H 1
#pragma once
//
// The OpenEXR release version is defined officially in
// src/lib/OpenEXRCore/openexr_version.h, but CMake doesn't readily allow
// that to be included here, so duplicate the settings for
// backwards-compatibility with applications that may expect to get the
// defines from this include.
//
#ifndef INCLUDED_OPENEXR_VERSION_H
#define OPENEXR_VERSION_MAJOR @OpenEXR_VERSION_MAJOR@
#define OPENEXR_VERSION_MINOR @OpenEXR_VERSION_MINOR@
#define OPENEXR_VERSION_PATCH @OpenEXR_VERSION_PATCH@
#endif
//
// Options / configuration based on O.S. / compiler
/////////////////////
// automated formatting does not handle the cmake tags well
// clang-format off
//
// Define and set to 1 if the target system has support for large
// stack sizes.
//
#cmakedefine OPENEXR_HAVE_LARGE_STACK 1
//////////////////////
//
// C++ namespace configuration / options
//
// Current internal library namespace name
//
#define OPENEXR_IMF_INTERNAL_NAMESPACE_CUSTOM @OPENEXR_NAMESPACE_CUSTOM@
#define OPENEXR_IMF_INTERNAL_NAMESPACE @OPENEXR_INTERNAL_IMF_NAMESPACE@
//
// Current public user namespace name
//
#define OPENEXR_IMF_NAMESPACE_CUSTOM @OPENEXR_NAMESPACE_CUSTOM@
#define OPENEXR_IMF_NAMESPACE @OPENEXR_IMF_NAMESPACE@
//
// Version string for runtime access
//
#define OPENEXR_VERSION_STRING "@OPENEXR_VERSION@"
#define OPENEXR_PACKAGE_STRING "@OPENEXR_PACKAGE_NAME@"
#define OPENEXR_VERSION_RELEASE_TYPE "@OPENEXR_VERSION_RELEASE_TYPE@"
// Deprecated, for back compatibility:
#define OPENEXR_VERSION_EXTRA "@OPENEXR_VERSION_RELEASE_TYPE@"
#define OPENEXR_LIB_VERSION_STRING "@OPENEXR_LIB_VERSION@"
// clang-format on
// Version as a single hex number, e.g. 0x01000300 == 1.0.3
#define OPENEXR_VERSION_HEX \
(((OPENEXR_VERSION_MAJOR) << 24) | \
((OPENEXR_VERSION_MINOR) << 16) | \
((OPENEXR_VERSION_PATCH) << 8))
// On modern versions of gcc & clang, __has_attribute can test support for
// __attribute__((attr)). Make sure it's safe for other compilers.
#ifndef __has_attribute
# define __has_attribute(x) 0
#endif
// Whether the user configured the library to have symbol visibility
// tagged
#cmakedefine OPENEXR_ENABLE_API_VISIBILITY
/// \defgroup ExportMacros Macros to manage symbol visibility
///
/// See website/SymbolVisibility.rst for more discussion about the
/// motivation for these macros
///
/// If we are compiling a DLL for Windows, there needs to be custom
/// rules for each library such that the macro swaps between doing a
/// dllexport and a dllimport, so the defines here are less
/// useful. Further, MSVC does not have this concept at all currently,
/// so is elided.
///
/// The top level macros which start with OPENEXR can act as simple
/// ways to combine the logic however for non-DLL or non-windows
/// platforms, but until the current patterns change, one should check
/// the specific library export.h (i.e. @sa IexExport.h,
/// @sa IlmThreadExport.h, @sa ImfExport.h, @sa ImfUtilExport.h )
///
/// These per-library exports define a subset which are used by that
/// library.
///
/// Iex is simple and does not need to do more than expose class types
/// and functions, and does not have any private members to hide, so
/// only provides a couple of the possible macros.
///
/// Similarly, IlmThread is also reasonably simple.
///
/// OpenEXR and OpenEXRUtil have much more logic and have to deal with
/// templates and template instantiation, and so define more of the
/// macros.
///
/// @{
#if defined(OPENEXR_ENABLE_API_VISIBILITY) && \
!(defined(OPENEXR_DLL) || defined(_MSC_VER))
# define OPENEXR_PUBLIC_SYMBOL_ATTRIBUTE \
__attribute__ ((__visibility__ ("default")))
# define OPENEXR_PRIVATE_SYMBOL_ATTRIBUTE \
__attribute__ ((__visibility__ ("hidden")))
// clang differs from gcc and has type visibility which is needed
// for enums and templates, and isn't well documented, but causes
// the vtable and typeinfo to be made visible, but not necessarily
// all the members
# if __has_attribute(__type_visibility__)
# define OPENEXR_PUBLIC_TYPE_VISIBILITY_ATTRIBUTE \
__attribute__ ((__type_visibility__ ("default")))
# endif
// these are always the same, at least in current compilers
# define OPENEXR_EXPORT OPENEXR_PUBLIC_SYMBOL_ATTRIBUTE
# define OPENEXR_HIDDEN OPENEXR_PRIVATE_SYMBOL_ATTRIBUTE
// currently define this as the same between compilers to export
// things like default copy ctors etc, and do not use the type
// visibility which only exports the typeinfo / vtable
# define OPENEXR_EXPORT_TYPE OPENEXR_EXPORT
# define OPENEXR_EXPORT_EXTERN_TEMPLATE OPENEXR_EXPORT
# ifdef OPENEXR_PUBLIC_TYPE_VISIBILITY_ATTRIBUTE
# define OPENEXR_EXPORT_ENUM OPENEXR_PUBLIC_TYPE_VISIBILITY_ATTRIBUTE
# define OPENEXR_EXPORT_TEMPLATE_TYPE \
OPENEXR_PUBLIC_TYPE_VISIBILITY_ATTRIBUTE
// clang (well, type_visibility) seems empirically need the
// default/public symbol tag when specifying explicit template
// instantiations, where gcc (no type_visibility) complains if
// you set that
# define OPENEXR_EXPORT_TEMPLATE_INSTANCE OPENEXR_EXPORT
# else
# define OPENEXR_EXPORT_ENUM
# define OPENEXR_EXPORT_TEMPLATE_TYPE OPENEXR_EXPORT
# define OPENEXR_EXPORT_TEMPLATE_INSTANCE
# endif
#else // msvc or api visibility disabled, just clear all this out (DLLs will define a set anyway)
# define OPENEXR_EXPORT
# define OPENEXR_HIDDEN
# define OPENEXR_EXPORT_TYPE
# define OPENEXR_EXPORT_EXTERN_TEMPLATE
# define OPENEXR_EXPORT_ENUM
# define OPENEXR_EXPORT_TEMPLATE_TYPE
# define OPENEXR_EXPORT_TYPE
# define OPENEXR_EXPORT_TEMPLATE_INSTANCE
#endif
#if defined(__cplusplus) && (__cplusplus >= 201402L)
# define OPENEXR_DEPRECATED(msg) [[deprecated (msg)]]
#endif
#ifndef OPENEXR_DEPRECATED
# ifdef _MSC_VER
# define OPENEXR_DEPRECATED(msg) __declspec(deprecated (msg))
# else
# define OPENEXR_DEPRECATED(msg) __attribute__ ((deprecated (msg)))
# endif
#endif
#endif // INCLUDED_OPENEXR_CONFIG_H