Merge branch 'master' of github.com:tfussell/xlnt

This commit is contained in:
Thomas Fussell 2016-07-05 21:27:47 -04:00
commit c99d14792f
3 changed files with 25 additions and 13 deletions

View File

@ -1,14 +1,26 @@
version: '{build}' version: '{build}'
os: Visual Studio 2015 os: Visual Studio 2015
configuration:
- Debug
environment:
matrix:
- SHARED: ON
STATIC: OFF
- SHARED: OFF
STATIC: ON
init: [] init: []
install: [] install: []
build_script: before_build:
- git submodule init - git submodule update --init --recursive
- git submodule update - cmake -H. -Bbuild -G"Visual Studio 14 2015 Win64" -DSHARED=%SHARED% -DSTATIC=%STATIC% -DTESTS=ON
- set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
- mkdir build build:
- cd build project: build\xlnt.sln
- cmake -G "Visual Studio 14 2015 Win64" -D SHARED=1 -D TESTS=1 .. parallel: true
- cmake --build . --config Debug verbosity: minimal
test_script: test_script:
- bin\xlnt.test.exe - build\bin\xlnt.test.exe

View File

@ -103,7 +103,7 @@ endif()
if(STATIC) if(STATIC)
add_library(xlnt.static STATIC ${HEADERS} ${SOURCES} ${MINIZ} ${PUGIXML}) 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 install(TARGETS xlnt.static
LIBRARY DESTINATION ${LIB_DEST_DIR} LIBRARY DESTINATION ${LIB_DEST_DIR}
ARCHIVE 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; const limit_style LimitStyle = limit_style::openpyxl;
#ifndef XLNT_API #ifndef XLNT_API
#if defined(_DLL) && defined(_MSC_VER) #if !defined(XLNT_STATIC) && defined(_MSC_VER)
#ifdef XLNT_EXPORT #ifdef XLNT_EXPORT
#define XLNT_API __declspec(dllexport) #define XLNT_API __declspec(dllexport)
#else #else