mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Merge pull request #56 from xpol/enable-static-build-for-appveyor
Enable static build for appveyor.
This commit is contained in:
commit
b777fbd490
30
appveyor.yml
30
appveyor.yml
|
@ -1,14 +1,26 @@
|
|||
version: '{build}'
|
||||
os: Visual Studio 2015
|
||||
|
||||
configuration:
|
||||
- Debug
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- SHARED: ON
|
||||
STATIC: OFF
|
||||
- SHARED: OFF
|
||||
STATIC: ON
|
||||
|
||||
init: []
|
||||
install: []
|
||||
build_script:
|
||||
- git submodule init
|
||||
- git submodule update
|
||||
- set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -G "Visual Studio 14 2015 Win64" -D SHARED=1 -D TESTS=1 ..
|
||||
- cmake --build . --config Debug
|
||||
before_build:
|
||||
- git submodule update --init --recursive
|
||||
- cmake -H. -Bbuild -G"Visual Studio 14 2015 Win64" -DSHARED=%SHARED% -DSTATIC=%STATIC% -DTESTS=ON
|
||||
|
||||
build:
|
||||
project: build\xlnt.sln
|
||||
parallel: true
|
||||
verbosity: minimal
|
||||
|
||||
test_script:
|
||||
- bin\xlnt.test.exe
|
||||
- build\bin\xlnt.test.exe
|
||||
|
|
|
@ -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}
|
||||
|
@ -149,7 +149,7 @@ configure_file(
|
|||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../include/xlnt
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../include/xlnt
|
||||
DESTINATION include
|
||||
PATTERN ".DS_Store" EXCLUDE
|
||||
)
|
||||
|
@ -159,4 +159,4 @@ install(FILES "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc"
|
|||
)
|
||||
|
||||
add_custom_target(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user