From: Axel R. <ro...@us...> - 2008-03-07 19:17:45
|
Update of /cvsroot/sdif/Easdif/easdif In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13080/easdif Modified Files: CMakeLists.txt easdif_exports.hpp Log Message: Support compilation as static library on windows Index: easdif_exports.hpp =================================================================== RCS file: /cvsroot/sdif/Easdif/easdif/easdif_exports.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** easdif_exports.hpp 26 Nov 2007 19:10:58 -0000 1.1 --- easdif_exports.hpp 7 Mar 2008 19:17:40 -0000 1.2 *************** *** 28,46 **** #define EASDIF_EXPORTS_H ! #ifdef WIN32 ! # ifdef DO_EXPORT_SDIF ! # define EASDIF_API __declspec(dllexport) ! # else ! # define EASDIF_API __declspec(dllimport) ! # endif #else ! # if defined(__GNUC__) && defined( GCC_HAS_VISIBILITY) ! # define EASDIF_API __attribute__ ((visibility("default"))) # else ! # define EASDIF_API # endif #endif - #endif --- 28,49 ---- #define EASDIF_EXPORTS_H ! #if defined( EASDIF_IS_STATIC) || defined(SDIF_IS_STATIC) ! # define EASDIF_API #else ! # ifdef WIN32 ! # ifdef DO_EXPORT_SDIF ! # define EASDIF_API __declspec(dllexport) ! # else ! # define EASDIF_API __declspec(dllimport) ! # endif # else ! # if defined(__GNUC__) && defined( GCC_HAS_VISIBILITY) ! # define EASDIF_API __attribute__ ((visibility("default"))) ! # else ! # define EASDIF_API ! # endif # endif #endif #endif Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/sdif/Easdif/easdif/CMakeLists.txt,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** CMakeLists.txt 11 Feb 2008 17:30:02 -0000 1.21 --- CMakeLists.txt 7 Mar 2008 19:17:40 -0000 1.22 *************** *** 35,41 **** ADD_LIBRARY(Easdif_static_pic${DEBUGEXT} STATIC ${easdif_SOURCES} ${sdif_CXX_SOURCES} ) IF(CMAKE_COMPILER_IS_GNUCXX) ! SET_TARGET_PROPERTIES(Easdif_static_pic${DEBUGEXT} PROPERTIES COMPILE_FLAGS -fPIC) ENDIF(CMAKE_COMPILER_IS_GNUCXX) ADD_LIBRARY(Easdif_static${DEBUGEXT} STATIC ${easdif_SOURCES} ${sdif_CXX_SOURCES} ) ENDIF(EASDIF_BUILD_STATIC) ADD_LIBRARY(Easdif${DEBUGEXT} SHARED ${easdif_SOURCES} ${sdif_CXX_SOURCES} ) --- 35,42 ---- ADD_LIBRARY(Easdif_static_pic${DEBUGEXT} STATIC ${easdif_SOURCES} ${sdif_CXX_SOURCES} ) IF(CMAKE_COMPILER_IS_GNUCXX) ! SET_TARGET_PROPERTIES(Easdif_static_pic${DEBUGEXT} PROPERTIES COMPILE_FLAGS "-fPIC -DEASDIF_IS_STATIC") ENDIF(CMAKE_COMPILER_IS_GNUCXX) ADD_LIBRARY(Easdif_static${DEBUGEXT} STATIC ${easdif_SOURCES} ${sdif_CXX_SOURCES} ) + SET_TARGET_PROPERTIES(Easdif_static${DEBUGEXT} PROPERTIES COMPILE_FLAGS "-DEASDIF_IS_STATIC") ENDIF(EASDIF_BUILD_STATIC) ADD_LIBRARY(Easdif${DEBUGEXT} SHARED ${easdif_SOURCES} ${sdif_CXX_SOURCES} ) |