RAMSES Documentation  27.0.130
Information for RAMSES users and developers
APIExport.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // Copyright (C) 2015 BMW Car IT GmbH
3 // -------------------------------------------------------------------------
4 // This Source Code Form is subject to the terms of the Mozilla Public
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
6 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 // -------------------------------------------------------------------------
8 
9 #ifndef RAMSES_APIEXPORT_H
10 #define RAMSES_APIEXPORT_H
11 
12 #ifndef RAMSES_API
13 
14 #if defined(_WIN32)
15  #define RAMSES_API_EXPORT __declspec(dllexport)
16  #define RAMSES_API_IMPORT __declspec(dllimport)
17 #elif defined(__GNUC__)
18  #define RAMSES_API_EXPORT __attribute((visibility ("default")))
19  #define RAMSES_API_IMPORT
20 #elif defined(__ghs__)
21  // not needed, does not use shared library
22  #define RAMSES_API_EXPORT
23  #define RAMSES_API_IMPORT
24 #else
25  #error "Compiler unknown/not supported"
26 #endif
27 
28 #if defined(RAMSES_LINK_SHARED_EXPORT)
29  #define RAMSES_API RAMSES_API_EXPORT
30 #elif defined(RAMSES_LINK_SHARED_IMPORT)
31  #define RAMSES_API RAMSES_API_IMPORT
32 #elif defined(RAMSES_LINK_STATIC)
33  #define RAMSES_API
34 #else
35  #define RAMSES_API RAMSES_API_IMPORT
36 #endif
37 
38 #endif
39 
40 #endif