IlmThreadExport.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. // Copyright (c) Contributors to the OpenEXR Project.
  4. //
  5. #ifndef INCLUDED_ILMTHREADEXPORT_H
  6. #define INCLUDED_ILMTHREADEXPORT_H
  7. #include "OpenEXRConfig.h"
  8. // See docs/SymbolVisibility.md for more discussion
  9. /// \addtogroup ExportMacros
  10. /// @{
  11. // are we making a DLL under windows (might be msvc or mingw or others)
  12. #if defined(OPENEXR_DLL)
  13. // when building as a DLL for windows, typical dllexport / import case
  14. // where we need to switch depending on whether we are compiling
  15. // internally or not
  16. # if defined(ILMTHREAD_EXPORTS)
  17. # define ILMTHREAD_EXPORT __declspec(dllexport)
  18. # else
  19. # define ILMTHREAD_EXPORT __declspec(dllimport)
  20. # endif
  21. // DLLs don't support these types of visibility controls, just leave them as empty
  22. # define ILMTHREAD_EXPORT_TYPE
  23. # define ILMTHREAD_HIDDEN
  24. #else // OPENEXR_DLL
  25. // just pass these through from the top level config
  26. # define ILMTHREAD_EXPORT OPENEXR_EXPORT
  27. # define ILMTHREAD_HIDDEN OPENEXR_HIDDEN
  28. # define ILMTHREAD_EXPORT_TYPE OPENEXR_EXPORT_TYPE
  29. #endif // OPENEXR_DLL
  30. /// @}
  31. #endif // INCLUDED_ILMTHREADEXPORT_H