OpenEXRConfig.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. // SPDX-License-Identifier: BSD-3-Clause
  2. // Copyright (c) Contributors to the OpenEXR Project.
  3. // This file is auto-generated by the configure step
  4. #ifndef INCLUDED_OPENEXR_CONFIG_H
  5. #define INCLUDED_OPENEXR_CONFIG_H 1
  6. #pragma once
  7. //
  8. // Options / configuration based on O.S. / compiler
  9. /////////////////////
  10. //
  11. // Define and set to 1 if the target system has support for large
  12. // stack sizes.
  13. //
  14. /* #undef OPENEXR_HAVE_LARGE_STACK */
  15. //////////////////////
  16. //
  17. // C++ namespace configuration / options
  18. //
  19. // Current internal library namespace name
  20. //
  21. #define OPENEXR_IMF_INTERNAL_NAMESPACE_CUSTOM 0
  22. #define OPENEXR_IMF_INTERNAL_NAMESPACE Imf_3_1
  23. //
  24. // Current public user namespace name
  25. //
  26. #define OPENEXR_IMF_NAMESPACE_CUSTOM 0
  27. #define OPENEXR_IMF_NAMESPACE Imf
  28. //
  29. // Version string for runtime access
  30. //
  31. #define OPENEXR_VERSION_STRING "3.1.11"
  32. #define OPENEXR_PACKAGE_STRING "OpenEXR 3.1.11"
  33. #define OPENEXR_VERSION_MAJOR 3
  34. #define OPENEXR_VERSION_MINOR 1
  35. #define OPENEXR_VERSION_PATCH 11
  36. #define OPENEXR_VERSION_RELEASE_TYPE ""
  37. // Deprecated, for back compatibility:
  38. #define OPENEXR_VERSION_EXTRA ""
  39. #define OPENEXR_LIB_VERSION_STRING "30.11.1"
  40. // Version as a single hex number, e.g. 0x01000300 == 1.0.3
  41. #define OPENEXR_VERSION_HEX ((uint32_t(OPENEXR_VERSION_MAJOR) << 24) | \
  42. (uint32_t(OPENEXR_VERSION_MINOR) << 16) | \
  43. (uint32_t(OPENEXR_VERSION_PATCH) << 8))
  44. // On modern versions of gcc & clang, __has_attribute can test support for
  45. // __attribute__((attr)). Make sure it's safe for other compilers.
  46. #ifndef __has_attribute
  47. # define __has_attribute(x) 0
  48. #endif
  49. // Whether the user configured the library to have symbol visibility
  50. // tagged
  51. #define OPENEXR_ENABLE_API_VISIBILITY
  52. /// \defgroup ExportMacros Macros to manage symbol visibility
  53. ///
  54. /// See docs/SymbolVisibility.md for more discussion about the
  55. /// motivation for these macros
  56. ///
  57. /// If we are compiling a DLL for Windows, there needs to be custom
  58. /// rules for each library such that the macro swaps between doing a
  59. /// dllexport and a dllimport, so the defines here are less
  60. /// useful. Further, MSVC does not have this concept at all currently,
  61. /// so is elided.
  62. ///
  63. /// The top level macros which start with OPENEXR can act as simple
  64. /// ways to combine the logic however for non-DLL or non-windows
  65. /// platforms, but until the current patterns change, one should check
  66. /// the specific library export.h (i.e. @sa IexExport.h,
  67. /// @sa IlmThreadExport.h, @sa ImfExport.h, @sa ImfUtilExport.h )
  68. ///
  69. /// These per-library exports define a subset which are used by that
  70. /// library.
  71. ///
  72. /// Iex is simple and does not need to do more than expose class types
  73. /// and functions, and does not have any private members to hide, so
  74. /// only provides a couple of the possible macros.
  75. ///
  76. /// Similarly, IlmThread is also reasonably simple.
  77. ///
  78. /// OpenEXR and OpenEXRUtil have much more logic and have to deal with
  79. /// templates and template instantiation, and so define more of the
  80. /// macros.
  81. ///
  82. /// @{
  83. #if defined(OPENEXR_ENABLE_API_VISIBILITY) && ! ( defined(OPENEXR_DLL) || defined(_MSC_VER) )
  84. # define OPENEXR_PUBLIC_SYMBOL_ATTRIBUTE __attribute__ ((__visibility__ ("default")))
  85. # define OPENEXR_PRIVATE_SYMBOL_ATTRIBUTE __attribute__ ((__visibility__ ("hidden")))
  86. // clang differs from gcc and has type visibility which is needed
  87. // for enums and templates, and isn't well documented, but causes
  88. // the vtable and typeinfo to be made visible, but not necessarily
  89. // all the members
  90. # if __has_attribute(__type_visibility__)
  91. # define OPENEXR_PUBLIC_TYPE_VISIBILITY_ATTRIBUTE __attribute__ ((__type_visibility__ ("default")))
  92. # endif
  93. // these are always the same, at least in current compilers
  94. # define OPENEXR_EXPORT OPENEXR_PUBLIC_SYMBOL_ATTRIBUTE
  95. # define OPENEXR_HIDDEN OPENEXR_PRIVATE_SYMBOL_ATTRIBUTE
  96. // currently define this as the same between compilers to export
  97. // things like default copy ctors etc, and do not use the type
  98. // visibility which only exports the typeinfo / vtable
  99. # define OPENEXR_EXPORT_TYPE OPENEXR_EXPORT
  100. # define OPENEXR_EXPORT_EXTERN_TEMPLATE OPENEXR_EXPORT
  101. # ifdef OPENEXR_PUBLIC_TYPE_VISIBILITY_ATTRIBUTE
  102. # define OPENEXR_EXPORT_ENUM OPENEXR_PUBLIC_TYPE_VISIBILITY_ATTRIBUTE
  103. # define OPENEXR_EXPORT_TEMPLATE_TYPE OPENEXR_PUBLIC_TYPE_VISIBILITY_ATTRIBUTE
  104. // clang (well, type_visibility) seems empirically need the
  105. // default/public symbol tag when specifying explicit template
  106. // instantiations, where gcc (no type_visibility) complains if
  107. // you set that
  108. # define OPENEXR_EXPORT_TEMPLATE_INSTANCE OPENEXR_EXPORT
  109. # else
  110. # define OPENEXR_EXPORT_ENUM
  111. # define OPENEXR_EXPORT_TEMPLATE_TYPE OPENEXR_EXPORT
  112. # define OPENEXR_EXPORT_TEMPLATE_INSTANCE
  113. # endif
  114. #else // msvc or api visibility disabled, just clear all this out (DLLs will define a set anyway)
  115. # define OPENEXR_EXPORT
  116. # define OPENEXR_HIDDEN
  117. # define OPENEXR_EXPORT_TYPE
  118. # define OPENEXR_EXPORT_EXTERN_TEMPLATE
  119. # define OPENEXR_EXPORT_ENUM
  120. # define OPENEXR_EXPORT_TEMPLATE_TYPE
  121. # define OPENEXR_EXPORT_TYPE
  122. # define OPENEXR_EXPORT_TEMPLATE_INSTANCE
  123. #endif
  124. #if defined(__cplusplus) && (__cplusplus >= 201402L)
  125. # define OPENEXR_DEPRECATED(msg) [[deprecated(msg)]]
  126. #endif
  127. #ifndef OPENEXR_DEPRECATED
  128. # ifdef _MSC_VER
  129. # define OPENEXR_DEPRECATED(msg) __declspec(deprecated(msg))
  130. # else
  131. # define OPENEXR_DEPRECATED(msg) __attribute__((deprecated(msg)))
  132. # endif
  133. #endif
  134. #endif // INCLUDED_OPENEXR_CONFIG_H