diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/util/util.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/mbgl/util/util.hpp b/include/mbgl/util/util.hpp index 7960b40299..178f1cba48 100644 --- a/include/mbgl/util/util.hpp +++ b/include/mbgl/util/util.hpp @@ -19,3 +19,24 @@ #else #define MBGL_CONSTEXPR inline #endif + +// Compiler defines for making symbols visible, otherwise they +// will be defined as hidden by default. + +#if defined WIN32 + #ifdef MBGL_BUILDING_LIB + #ifdef __GNUC__ + #define MBGL_EXPORT __attribute__((dllexport)) + #else + #define MBGL_EXPORT __declspec(dllexport) + #endif + #else + #ifdef __GNUC__ + #define MBGL_EXPORT __attribute__((dllimport)) + #else + #define MBGL_EXPORT __declspec(dllimport) + #endif + #endif +#else + #define MBGL_EXPORT __attribute__((visibility ("default"))) // NOLINT +#endif |