Ardour  8.7-15-gadf511264b
liblua_visibility.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __liblua_visibility_h__
20 #define __liblua_visibility_h__
21 
22 #if defined(COMPILER_MSVC)
23 # define LIBLUA_DLL_IMPORT __declspec(dllimport)
24 # define LIBLUA_DLL_EXPORT __declspec(dllexport)
25 # define LIBLUA_DLL_LOCAL
26 #else
27 # define LIBLUA_DLL_IMPORT __attribute__ ((visibility ("default")))
28 # define LIBLUA_DLL_EXPORT __attribute__ ((visibility ("default")))
29 # define LIBLUA_DLL_LOCAL __attribute__ ((visibility ("hidden")))
30 #endif
31 
32 
33 #ifdef COMPILER_MSVC
34 // MSVC: build liblua as DLL
35 # define LIBLUA_BUILD_AS_DLL
36 #else
37 // others currently use a static lib (incl. with libardour)
38 # define LIBLUA_STATIC
39 #endif
40 
41 
42 #ifdef LIBLUA_STATIC
43 # define LIBLUA_API
44 #else
45 // define when building the DLL (instead of using it)
46 # ifdef LIBLUA_DLL_EXPORTS
47 # define LIBLUA_API LIBLUA_DLL_EXPORT
48 # else
49 # define LIBLUA_API LIBLUA_DLL_IMPORT
50 # endif
51 #endif
52 
53 #endif /* __liblua_visibility_h__ */