export.hpp 1.02 KB
Newer Older
1
/* ***** BEGIN LICENSE BLOCK *****
Julien WAECHTER's avatar
Julien WAECHTER committed
2
 * FW4SPL - Copyright (C) IRCAD, 2009-2013.
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
 * published by the Free Software Foundation.
 * ****** END LICENSE BLOCK ****** */

#ifndef _IOITK_CONFIG_HPP_
#define _IOITK_CONFIG_HPP_

#ifdef _WIN32
    #pragma warning( disable : 4251 )


    #ifdef IOITK_EXPORTS
    #define IOITK_API __declspec(dllexport)
    #else
    #define IOITK_API __declspec(dllimport)
    #endif

    #define IOITK_CLASS_API
    #pragma warning(disable: 4290)

#elif defined(__GNUC__) && (__GNUC__>=4) && defined(__USE_DYLIB_VISIBILITY__)

    #ifdef IOITK_EXPORTS
    #define IOITK_API __attribute__ ((visibility("default")))
    #define IOITK_CLASS_API __attribute__ ((visibility("default")))
    #else
    #define IOITK_API __attribute__ ((visibility("hidden")))
    #define IOITK_CLASS_API __attribute__ ((visibility("hidden")))
    #endif

#else

    #define IOITK_API
    #define IOITK_CLASS_API

#endif

#endif // #ifndef _IOITK_CONFIG_HPP_