From 68a1ccb84f9414a0cd77782a31793cbf725fe0ee Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Mon, 1 Jul 2019 16:34:29 +0900 Subject: [PATCH] rlottie: Fix issue with LOT_EXPORT for windows --- inc/rlottie.h | 30 +++++++++++------------------- inc/rlottiecommon.h | 30 +++++++++++------------------- src/vector/stb/stb_image.cpp | 30 +++++++++++------------------- 3 files changed, 33 insertions(+), 57 deletions(-) diff --git a/inc/rlottie.h b/inc/rlottie.h index 74def69..0795615 100644 --- a/inc/rlottie.h +++ b/inc/rlottie.h @@ -23,26 +23,18 @@ #include #include -#ifdef _WIN32 -#ifdef LOT_BUILD -#ifdef DLL_EXPORT -#define LOT_EXPORT __declspec(dllexport) +#if defined _WIN32 || defined __CYGWIN__ + #ifdef LOT_BUILD + #define LOT_EXPORT __declspec(dllexport) + #else + #define LOT_EXPORT __declspec(dllimport) + #endif #else -#define LOT_EXPORT -#endif -#else -#define LOT_EXPORT __declspec(dllimport) -#endif -#else -#ifdef __GNUC__ -#if __GNUC__ >= 4 -#define LOT_EXPORT __attribute__((visibility("default"))) -#else -#define LOT_EXPORT -#endif -#else -#define LOT_EXPORT -#endif + #ifdef LOT_BUILD + #define LOT_EXPORT __attribute__ ((visibility ("default"))) + #else + #define LOT_EXPORT + #endif #endif class AnimationImpl; diff --git a/inc/rlottiecommon.h b/inc/rlottiecommon.h index b3ac022..78ce7de 100644 --- a/inc/rlottiecommon.h +++ b/inc/rlottiecommon.h @@ -19,26 +19,18 @@ #ifndef _RLOTTIE_COMMON_H_ #define _RLOTTIE_COMMON_H_ -#ifdef _WIN32 -#ifdef LOT_BUILD -#ifdef DLL_EXPORT -#define LOT_EXPORT __declspec(dllexport) +#if defined _WIN32 || defined __CYGWIN__ + #ifdef LOT_BUILD + #define LOT_EXPORT __declspec(dllexport) + #else + #define LOT_EXPORT __declspec(dllimport) + #endif #else -#define LOT_EXPORT -#endif -#else -#define LOT_EXPORT __declspec(dllimport) -#endif -#else -#ifdef __GNUC__ -#if __GNUC__ >= 4 -#define LOT_EXPORT __attribute__((visibility("default"))) -#else -#define LOT_EXPORT -#endif -#else -#define LOT_EXPORT -#endif + #ifdef LOT_BUILD + #define LOT_EXPORT __attribute__ ((visibility ("default"))) + #else + #define LOT_EXPORT + #endif #endif diff --git a/src/vector/stb/stb_image.cpp b/src/vector/stb/stb_image.cpp index e9d79e4..dceab58 100644 --- a/src/vector/stb/stb_image.cpp +++ b/src/vector/stb/stb_image.cpp @@ -13,26 +13,18 @@ #include "stb_image.h" -#ifdef _WIN32 -#ifdef LOT_BUILD -#ifdef DLL_EXPORT -#define LOT_EXPORT __declspec(dllexport) +#if defined _WIN32 || defined __CYGWIN__ + #ifdef LOT_BUILD + #define LOT_EXPORT __declspec(dllexport) + #else + #define LOT_EXPORT __declspec(dllimport) + #endif #else -#define LOT_EXPORT -#endif -#else -#define LOT_EXPORT __declspec(dllimport) -#endif -#else -#ifdef __GNUC__ -#if __GNUC__ >= 4 -#define LOT_EXPORT __attribute__((visibility("default"))) -#else -#define LOT_EXPORT -#endif -#else -#define LOT_EXPORT -#endif + #ifdef LOT_BUILD + #define LOT_EXPORT __attribute__ ((visibility ("default"))) + #else + #define LOT_EXPORT + #endif #endif #ifdef __cplusplus -- 2.7.4