SheafSystem  0.0.0.0
sheaf_dll_spec.h
Go to the documentation of this file.
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
20 
21 #ifndef SHEAF_DLL_SPEC_H
22 #define SHEAF_DLL_SPEC_H
23 
24 #ifdef _WIN32
25 
26 // Compiling for MS C++;
27 // set decspec for dlls.
28 
29 #if defined SHEAF_DLL_EXPORTS
30 
31 // Compiling library itself,
32 // set declspec to export.
33 
34 #define SHEAF_DLL_SPEC __declspec(dllexport)
35 
36 #elif defined SHEAF_DLL_IMPORTS
37 
38 // Compiling clients of library,
39 // set declspec to import.
40 
41 #define SHEAF_DLL_SPEC __declspec(dllimport)
42 
43 #else
44 
45 // Not compiling for dll
46 // make declspec disappear.
47 
48 #define SHEAF_DLL_SPEC
49 
50 #endif // ifdef SHEAF_EXPORTS
51 
52 #else
53 
54 // Not compiling for MS C++;
55 // make declspec disappear.
56 
57 #define SHEAF_DLL_SPEC
58 
59 #endif // ifdef _WIN32
60 
61 #endif // ifndef SHEAF_DLL_SPEC_H