From 281dfa7211fd5855b43cf707707a37c5bf119dcb Mon Sep 17 00:00:00 2001 From: Brecht Sanders Date: Mon, 9 Mar 2020 20:46:18 +0100 Subject: [PATCH] --- CMakeLists.txt | 4 ++-- Changelog.txt | 6 ++++++ include/xlsxio_read.h | 2 +- include/xlsxio_version.h | 2 +- include/xlsxio_write.h | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c29e5aa..9db805c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,6 @@ ENDIF() FOREACH(LINKTYPE ${LINKTYPES}) ADD_LIBRARY(xlsxio_read_${LINKTYPE} ${LINKTYPE} lib/xlsxio_read.c lib/xlsxio_read_sharedstrings.c) - SET_TARGET_PROPERTIES(xlsxio_read_${LINKTYPE} PROPERTIES DEFINE_SYMBOL "BUILD_XLSXIO_DLL") SET_TARGET_PROPERTIES(xlsxio_read_${LINKTYPE} PROPERTIES COMPILE_DEFINITIONS "BUILD_XLSXIO;${ANYZIP_DEF}") SET_TARGET_PROPERTIES(xlsxio_read_${LINKTYPE} PROPERTIES OUTPUT_NAME xlsxio_read) IF(MINGW AND LINKTYPE STREQUAL "SHARED") @@ -97,7 +96,6 @@ FOREACH(LINKTYPE ${LINKTYPES}) SET(ALLTARGETS ${ALLTARGETS} xlsxio_read_${LINKTYPE}) ADD_LIBRARY(xlsxio_write_${LINKTYPE} ${LINKTYPE} lib/xlsxio_write.c) - SET_TARGET_PROPERTIES(xlsxio_write_${LINKTYPE} PROPERTIES DEFINE_SYMBOL "BUILD_XLSXIO_DLL") SET_TARGET_PROPERTIES(xlsxio_write_${LINKTYPE} PROPERTIES COMPILE_DEFINITIONS "BUILD_XLSXIO;${ANYZIP_DEF}") SET_TARGET_PROPERTIES(xlsxio_write_${LINKTYPE} PROPERTIES OUTPUT_NAME xlsxio_write) IF(MINGW AND LINKTYPE STREQUAL "SHARED") @@ -131,6 +129,8 @@ FOREACH(LINKTYPE ${LINKTYPES}) SET(EXELINKTYPE ${LINKTYPE}) ENDFOREACH() +#SET_TARGET_PROPERTIES(xlsxio_read_SHARED PROPERTIES DEFINE_SYMBOL "BUILD_XLSXIO_DLL") +#SET_TARGET_PROPERTIES(xlsxio_write_SHARED PROPERTIES DEFINE_SYMBOL "BUILD_XLSXIO_DLL") IF(BUILD_TOOLS) ADD_EXECUTABLE(xlsxio_xlsx2csv src/xlsxio_xlsx2csv.c) diff --git a/Changelog.txt b/Changelog.txt index 8329c87..c0c32b5 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,3 +1,9 @@ +0.2.22 + +2020-03-09 Brecht Sanders https://github.com/brechtsanders/ + + * fixed CMakeLists.txt issue where BUILD_XLSXIO_DLL was also defined for static libraries + 0.2.21 2018-12-14 Brecht Sanders https://github.com/brechtsanders/ diff --git a/include/xlsxio_read.h b/include/xlsxio_read.h index b3d05a0..2768512 100644 --- a/include/xlsxio_read.h +++ b/include/xlsxio_read.h @@ -60,7 +60,7 @@ typedef unsigned __int64 uint64_t; /*! \cond PRIVATE */ #ifndef DLL_EXPORT_XLSXIO #ifdef _WIN32 -#if defined(BUILD_XLSXIO_DLL) || defined(BUILD_XLSXIO_SHARED) +#if defined(BUILD_XLSXIO_DLL) || defined(BUILD_XLSXIO_SHARED) || defined(xlsxio_write_SHARED_EXPORTS) #define DLL_EXPORT_XLSXIO __declspec(dllexport) #elif !defined(STATIC) && !defined(BUILD_XLSXIO_STATIC) && !defined(BUILD_XLSXIO) #define DLL_EXPORT_XLSXIO __declspec(dllimport) diff --git a/include/xlsxio_version.h b/include/xlsxio_version.h index c06add4..2806b16 100644 --- a/include/xlsxio_version.h +++ b/include/xlsxio_version.h @@ -49,7 +49,7 @@ THE SOFTWARE. /*! \brief minor version number */ #define XLSXIO_VERSION_MINOR 2 /*! \brief micro version number */ -#define XLSXIO_VERSION_MICRO 21 +#define XLSXIO_VERSION_MICRO 22 /*! @} */ /*! \cond PRIVATE */ diff --git a/include/xlsxio_write.h b/include/xlsxio_write.h index 7d9c9a6..aead750 100644 --- a/include/xlsxio_write.h +++ b/include/xlsxio_write.h @@ -45,7 +45,7 @@ typedef signed __int64 int64_t; /*! \cond PRIVATE */ #ifndef DLL_EXPORT_XLSXIO #ifdef _WIN32 -#if defined(BUILD_XLSXIO_DLL) || defined(BUILD_XLSXIO_SHARED) +#if defined(BUILD_XLSXIO_DLL) || defined(BUILD_XLSXIO_SHARED) || defined(xlsxio_write_SHARED_EXPORTS) #define DLL_EXPORT_XLSXIO __declspec(dllexport) #elif !defined(STATIC) && !defined(BUILD_XLSXIO_STATIC) && !defined(BUILD_XLSXIO) #define DLL_EXPORT_XLSXIO __declspec(dllimport)