HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openexr_config.h
Go to the documentation of this file.
1 /*
2 ** SPDX-License-Identifier: BSD-3-Clause
3 ** Copyright Contributors to the OpenEXR Project.
4 */
5 
6 #ifndef OPENEXR_CONF_H
7 #define OPENEXR_CONF_H
8 #pragma once
9 
10 #include "OpenEXRConfig.h"
11 #include <IlmThreadConfig.h>
12 #include <ImathConfig.h>
13 
14 /// \addtogroup ExportMacros
15 /// @{
16 
17 // are we making a DLL under windows (might be msvc or mingw or others)
18 #if defined(OPENEXR_DLL)
19 
20 // when building as a DLL for windows, typical dllexport/import case
21 // where we need to switch depending on whether we are compiling
22 // internally or not
23 # if defined(OPENEXRCORE_EXPORTS)
24 # define EXR_EXPORT __declspec (dllexport)
25 # else
26 # define EXR_EXPORT __declspec (dllimport)
27 # endif
28 
29 #else
30 
31 # define EXR_EXPORT OPENEXR_EXPORT
32 
33 #endif
34 
35 /*
36  * MSVC does have printf format checks, but it is not in the form of a
37  * function attribute, so just skip for non-GCC/clang builds
38  */
39 #if defined(__GNUC__) || defined(__clang__)
40 # define EXR_PRINTF_FUNC_ATTRIBUTE __attribute__ ((format (printf, 3, 4)))
41 #else
42 # define EXR_PRINTF_FUNC_ATTRIBUTE
43 #endif
44 
45 /// @}
46 
47 #endif /* OPENEXR_CONF_H */