From e8348bf8020587a4be2c99d0ab4b7964507cbbb6 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 23 Apr 2012 08:10:00 +0000 Subject: [PATCH] Eobj: Fixed windows support. DAMN, Windows is broken... Thanks to vtorri. SVN revision: 70409 --- legacy/eobj/lib/CMakeLists.txt | 2 ++ legacy/eobj/lib/Eobj.h | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/legacy/eobj/lib/CMakeLists.txt b/legacy/eobj/lib/CMakeLists.txt index 7063c90335..c5eb82bcd0 100644 --- a/legacy/eobj/lib/CMakeLists.txt +++ b/legacy/eobj/lib/CMakeLists.txt @@ -3,6 +3,8 @@ LIST(APPEND EOBJ_CC_SOURCES eobj_base_class.c ) +ADD_DEFINITIONS(-D_EOBJ_BUILD=1) + include_directories( ${EINA_INCLUDE_DIRS} ) diff --git a/legacy/eobj/lib/Eobj.h b/legacy/eobj/lib/Eobj.h index 076a21a6bc..041f703ec2 100644 --- a/legacy/eobj/lib/Eobj.h +++ b/legacy/eobj/lib/Eobj.h @@ -4,6 +4,32 @@ #include #include +#ifdef EAPI +# undef EAPI +#endif + +#ifdef _WIN32 +# ifdef _EOBJ_BUILD +# ifdef DLL_EXPORT +# define EAPI __declspec(dllexport) +# else +# define EAPI +# endif /* ! DLL_EXPORT */ +# else +# define EAPI __declspec(dllimport) +# endif /* ! _EOBJ_BUILD */ +#else +# ifdef __GNUC__ +# if __GNUC__ >= 4 +# define EAPI __attribute__ ((visibility("default"))) +# else +# define EAPI +# endif +# else +# define EAPI +# endif +#endif /* ! _WIN32 */ + /** * @var _eobj_class_creation_lock * This variable is used for locking purposes in the class_get function