IexExport.h 911 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. // Copyright (c) Contributors to the OpenEXR Project.
  4. //
  5. #ifndef INCLUDED_IEXEXPORT_H
  6. #define INCLUDED_IEXEXPORT_H
  7. #include "OpenEXRConfig.h"
  8. #if defined(OPENEXR_DLL)
  9. // when building as a DLL for windows, typical dllexport / import case
  10. // where we need to switch depending on whether we are compiling
  11. // internally or not
  12. # if defined(IEX_EXPORTS)
  13. # define IEX_EXPORT __declspec(dllexport)
  14. # else
  15. # define IEX_EXPORT __declspec(dllimport)
  16. # endif
  17. // DLLs don't support these types of visibility controls, just leave them as empty
  18. # define IEX_EXPORT_TYPE
  19. # define IEX_EXPORT_ENUM
  20. #else // OPENEXR_DLL
  21. // just pass these through from the top level config
  22. # define IEX_EXPORT OPENEXR_EXPORT
  23. # define IEX_EXPORT_TYPE OPENEXR_EXPORT_TYPE
  24. # define IEX_EXPORT_ENUM OPENEXR_EXPORT_ENUM
  25. #endif // OPENEXR_DLL
  26. #endif // #ifndef INCLUDED_IEXEXPORT_H