VISR  0.11.1
Versatile Interactive Scene Renderer
export_symbols.hpp
Go to the documentation of this file.
1 /* Copyright Institute of Sound and Vibration Research - All rights reserved */
2 
3 #ifndef VISR_EXPORT_SYMBOLS_HPP_INCLUDED
4 #define VISR_EXPORT_SYMBOLS_HPP_INCLUDED
5 
13 #ifndef VISR_CORE_STATIC_LIBRARY
14 
15 #ifdef _MSC_VER // Windows platform
16 #ifdef VISR_BUILD_CORE_LIBRARY
17 #define VISR_CORE_LIBRARY_SYMBOL __declspec(dllexport)
18 #define VISR_PLUGIN_SYMBOL __declspec(dllimport)
19 #else
20 // Does create undefined symbols if the library is built statically, therefore the attributes are commented out.
21 // @note logic add logic to add these attributes only if the core library is built dynamically.
22 #define VISR_CORE_LIBRARY_SYMBOL __declspec(dllimport)
23 #define VISR_PLUGIN_SYMBOL __declspec(dllexport)
24 #endif // #ifdef VISR_BUILD_CORE_LIBRARY
25 #elif defined(__GNUC__)
26 
27 // Unix platforms (Linux and Mac OS X)
28 #define VISR_CORE_LIBRARY_SYMBOL __attribute__((visibility("default")))
29 #define VISR_PLUGIN_SYMBOL __attribute__((visibility("default")))
30 
31 #else
32 #error "Platform does not support symbol export."
33 #endif // #ifdef _WIN32
34 
35 #else // #ifndef VISR_CORE_STATIC_LIBRARY
36 
37 #define VISR_CORE_LIBRARY_SYMBOL // define as empty
38 #define VISR_PLUGIN_SYMBOL // define as empty
39 
40 #endif // #ifdef VISR_CORE_STATIC_LIBRARY
41 
42 #endif // #ifndef VISR_EXPORT_SYMBOLS_HPP_INCLUDED