Fixes static build for msvc.

This commit is contained in:
Xpol Wan 2016-07-05 13:03:00 +08:00
parent 076d42280e
commit 4976f54145
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ endif()
if(STATIC)
add_library(xlnt.static STATIC ${HEADERS} ${SOURCES} ${MINIZ} ${PUGIXML})
target_compile_definitions(xlnt.static PRIVATE XLNT_STATIC=1)
target_compile_definitions(xlnt.static PUBLIC XLNT_STATIC=1)
install(TARGETS xlnt.static
LIBRARY DESTINATION ${LIB_DEST_DIR}
ARCHIVE DESTINATION ${LIB_DEST_DIR}

View File

@ -55,7 +55,7 @@ enum class limit_style
const limit_style LimitStyle = limit_style::openpyxl;
#ifndef XLNT_API
#if defined(_DLL) && defined(_MSC_VER)
#if !defined(XLNT_STATIC) && defined(_MSC_VER)
#ifdef XLNT_EXPORT
#define XLNT_API __declspec(dllexport)
#else