ifm3d
common_export.h
1 /*
2  * Copyright 2023-present ifm electronic, gmbh
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #ifndef IFM3D_COMMON_EXPORT_HPP
7 #define IFM3D_COMMON_EXPORT_HPP
8 
9 #if defined(IFM3D_COMMON_STATIC_LIB)
10 # define IFM3D_COMMON_EXPORT
11 #else
12 # if defined(_MSC_VER)
13 # ifdef IFM3D_COMMON_DLL_BUILD
14 # define IFM3D_COMMON_EXPORT __declspec(dllexport)
15 # else
16 # define IFM3D_COMMON_EXPORT __declspec(dllimport)
17 # endif
18 # else
19 # define IFM3D_COMMON_EXPORT __attribute__((visibility("default")))
20 # endif
21 #endif
22 
23 #if defined(__GNUC__) || defined(__clang__)
24 # define IFM3D_COMMON_DEPRECATED __attribute__((deprecated))
25 #elif defined(_MSC_VER)
26 # define IFM3D_COMMON_DEPRECATED __declspec(deprecated)
27 #else
28 # define IFM3D_COMMON_DEPRECATED
29 #endif
30 
31 #if defined(__GNUC__) || defined(__clang__)
32 # define IFM3D_COMMON_LOCAL __attribute__((visibility("hidden")))
33 #else
34 # define IFM3D_COMMON_LOCAL
35 #endif
36 
39 #endif /* IFM3D_COMMON_EXPORT_HPP */