HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
halfExport.h
Go to the documentation of this file.
1 #ifndef HALFEXPORT_H
2 #define HALFEXPORT_H
3 
4 //
5 // Copyright (c) 2008 Lucasfilm Entertainment Company Ltd.
6 // All rights reserved. Used under authorization.
7 // This material contains the confidential and proprietary
8 // information of Lucasfilm Entertainment Company and
9 // may not be copied in whole or in part without the express
10 // written permission of Lucasfilm Entertainment Company.
11 // This copyright notice does not imply publication.
12 //
13 
14 #if defined(_WIN32)
15 # if defined(OPENEXR_DLL)
16 # define PLATFORM_EXPORT_DEFINITION __declspec(dllexport)
17 # define PLATFORM_IMPORT_DEFINITION __declspec(dllimport)
18 # define PLATFORM_EXPORT_CONST
19 # else
20 # define PLATFORM_EXPORT_DEFINITION
21 # define PLATFORM_IMPORT_DEFINITION
22 # define PLATFORM_EXPORT_CONST const
23 # endif
24 #else // linux/macos
25 # if defined(PLATFORM_VISIBILITY_AVAILABLE)
26 # define PLATFORM_EXPORT_DEFINITION __attribute__((visibility("default")))
27 # define PLATFORM_IMPORT_DEFINITION
28 # else
29 # define PLATFORM_EXPORT_DEFINITION
30 # define PLATFORM_IMPORT_DEFINITION
31 # endif
32 # define PLATFORM_EXPORT_CONST const
33  #endif
34 
35 #if defined(HALF_EXPORTS) // create library
36 # define HALF_EXPORT PLATFORM_EXPORT_DEFINITION
37 # define HALF_EXPORT_CONST PLATFORM_EXPORT_CONST
38 #else // use library
39 # define HALF_EXPORT PLATFORM_IMPORT_DEFINITION
40 # define HALF_EXPORT_CONST PLATFORM_EXPORT_CONST
41 #endif
42 
43 #endif // #ifndef HALFEXPORT_H
44