libxcks  0.1.0.1
export.hpp
Go to the documentation of this file.
1 /*
2  * libxcks
3  * Copyright (C) 2022 Julien Couot
4  *
5  * This program is free software: you can redistribute it and/or modify it
6  * under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or (at your
8  * option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13  * License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17  */
18 
25 #ifndef INC_EXPORT_HPP_A39ABC17_A9BB_4B2B_BC00_C943C1ADC1A6
26 #define INC_EXPORT_HPP_A39ABC17_A9BB_4B2B_BC00_C943C1ADC1A6
27 
28 //---------------------------------------------------------------------------
29 // No includes
30 //---------------------------------------------------------------------------
31 
32 
33 namespace libxcks
34 {
35 
36 #if defined(_WIN32) || defined(_WIN64)
37  #ifdef LIBXCKS_SHARED
38  #ifdef BUILDING_LIBXCKS
39  #define LIBXCKS_SO_EXPORT __declspec(dllexport)
40  #else
41  #define LIBXCKS_SO_EXPORT __declspec(dllimport)
42  #endif // BUILDING_LIBXCKS
43  #else
44  #define LIBXCKS_SO_EXPORT
45  #endif // LIBXCKS_SHARED
46 #elif defined(__GNUC__) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
47  #ifdef LIBXCKS_SHARED
48  #ifdef BUILDING_LIBXCKS
49  #define LIBXCKS_SO_EXPORT //__attribute__((visibility("default")))
50  #else
51  #define LIBXCKS_SO_EXPORT
52  #endif // BUILDING_LIBXCKS
53  #else
54  #define LIBXCKS_SO_EXPORT
55  #endif // LIBXCKS_SHARED
56 #else
57  #define LIBXCKS_SO_EXPORT
58 #endif // WIN32
59 //---------------------------------------------------------------------------
60 
61 } // namespace libxcks
62 //---------------------------------------------------------------------------
63 
64 #endif // INC_EXPORT_HPP_A39ABC17_A9BB_4B2B_BC00_C943C1ADC1A6