libopenmpt  0.2.3566
cross-platform C and C++ library to decode tracked music files
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
libopenmpt_config.h
Go to the documentation of this file.
1 /*
2  * libopenmpt_config.h
3  * -------------------
4  * Purpose: libopenmpt public interface configuration
5  * Notes : (currently none)
6  * Authors: OpenMPT Devs
7  * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
8  */
9 
10 #ifndef LIBOPENMPT_CONFIG_H
11 #define LIBOPENMPT_CONFIG_H
12 
19 /* provoke warnings if already defined */
20 #define LIBOPENMPT_API
21 #undef LIBOPENMPT_API
22 #define LIBOPENMPT_CXX_API
23 #undef LIBOPENMPT_CXX_API
24 
25 #if defined(__DOXYGEN__)
26 
27 #define LIBOPENMPT_API_HELPER_EXPORT
28 #define LIBOPENMPT_API_HELPER_IMPORT
29 #define LIBOPENMPT_API_HELPER_PUBLIC
30 #define LIBOPENMPT_API_HELPER_LOCAL
31 
32 #elif defined(_MSC_VER)
33 
34 #define LIBOPENMPT_API_HELPER_EXPORT __declspec(dllexport)
35 #define LIBOPENMPT_API_HELPER_IMPORT __declspec(dllimport)
36 #define LIBOPENMPT_API_HELPER_PUBLIC
37 #define LIBOPENMPT_API_HELPER_LOCAL
38 
39 #elif defined(__GNUC__) || defined(__clang__)
40 
41 #if defined(_WIN32)
42 #define LIBOPENMPT_API_HELPER_EXPORT __declspec(dllexport)
43 #define LIBOPENMPT_API_HELPER_IMPORT __declspec(dllimport)
44 #else
45 #define LIBOPENMPT_API_HELPER_EXPORT __attribute__((visibility("default")))
46 #define LIBOPENMPT_API_HELPER_IMPORT __attribute__((visibility("default")))
47 #endif
48 #define LIBOPENMPT_API_HELPER_PUBLIC __attribute__((visibility("default")))
49 #define LIBOPENMPT_API_HELPER_LOCAL __attribute__((visibility("hidden")))
50 
51 #else
52 
53 #define LIBOPENMPT_API_HELPER_EXPORT
54 #define LIBOPENMPT_API_HELPER_IMPORT
55 #define LIBOPENMPT_API_HELPER_PUBLIC
56 #define LIBOPENMPT_API_HELPER_LOCAL
57 
58 #endif
59 
60 #if defined(LIBOPENMPT_BUILD_DLL)
61 #define LIBOPENMPT_API LIBOPENMPT_API_HELPER_EXPORT
62 #elif defined(LIBOPENMPT_USE_DLL)
63 #define LIBOPENMPT_API LIBOPENMPT_API_HELPER_IMPORT
64 #else
65 #define LIBOPENMPT_API LIBOPENMPT_API_HELPER_PUBLIC
66 #endif
67 
68 #ifdef __cplusplus
69 #define LIBOPENMPT_CXX_API LIBOPENMPT_API
70 #if defined(LIBOPENMPT_USE_DLL)
71 #if defined(_MSC_VER) && !defined(_DLL)
72 #error "C++ interface is disabled if libopenmpt is built as a DLL and the runtime is statically linked. This is not supported by microsoft and cannot possibly work. Ever."
73 #undef LIBOPENMPT_CXX_API
74 #define LIBOPENMPT_CXX_API LIBOPENMPT_API_HELPER_LOCAL
75 #endif
76 #endif
77 #endif
78 
83 #include "libopenmpt_version.h"
84 
85 #endif /* LIBOPENMPT_CONFIG_H */