mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
install expat with vcpkg on appveyor, always link cryptopp and zlib
This commit is contained in:
parent
daae577178
commit
29ea2a4e99
|
@ -16,7 +16,7 @@ install:
|
|||
- mkdir downloads
|
||||
- type nul > downloads\AlwaysAllowDownloads
|
||||
- powershell -exec bypass scripts\bootstrap.ps1
|
||||
- vcpkg install cryptopp zlib
|
||||
- vcpkg install cryptopp zlib expat
|
||||
- vcpkg integrate install
|
||||
- cd ..
|
||||
|
||||
|
|
|
@ -129,20 +129,10 @@ add_dependencies(xlnt xlnt.third-party)
|
|||
target_link_libraries(xlnt PRIVATE libstudxml)
|
||||
target_include_directories(xlnt PUBLIC ${XLNT_INCLUDE_DIR})
|
||||
target_include_directories(xlnt PRIVATE ${XLNT_SOURCE_DIR})
|
||||
|
||||
if(LOCAL_ZLIB OR LOCAL_DEPENDENCIES)
|
||||
target_link_libraries(xlnt PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third-party/zlib/zlib-download-prefix/src/zlib-download-build/libz.a)
|
||||
else()
|
||||
target_link_libraries(xlnt PRIVATE ${ZLIB_LIBRARY_RELEASE})
|
||||
target_include_directories(xlnt PRIVATE ${ZLIB_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(LOCAL_CRYPTOPP OR LOCAL_DEPENDENCIES)
|
||||
target_link_libraries(xlnt PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third-party/cryptopp/cryptopp-download-prefix/src/cryptopp-download-build/libcryptopp.a)
|
||||
else()
|
||||
target_link_libraries(xlnt PRIVATE ${CRYPTOPP_LIBRARY_RELEASE})
|
||||
target_include_directories(xlnt PRIVATE ${CRYPTOPP_INCLUDE_DIR})
|
||||
endif()
|
||||
target_link_libraries(xlnt PRIVATE ${ZLIB_LIBRARY_RELEASE})
|
||||
target_include_directories(xlnt PRIVATE ${ZLIB_INCLUDE_DIR})
|
||||
target_link_libraries(xlnt PRIVATE ${CRYPTOPP_LIBRARY_RELEASE})
|
||||
target_include_directories(xlnt PRIVATE ${CRYPTOPP_INCLUDE_DIR})
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(xlnt PROPERTIES COMPILE_FLAGS "/wd\"4251\" /wd\"4275\" /wd\"4068\" /MP")
|
||||
|
|
8
third-party/libstudxml/CMakeLists.txt
vendored
8
third-party/libstudxml/CMakeLists.txt
vendored
|
@ -51,11 +51,9 @@ add_library(libstudxml STATIC ${LIBSTUDXML} ${GENX} ${EXPAT})
|
|||
target_compile_definitions(libstudxml PUBLIC LIBSTUDXML_STATIC_LIB=1)
|
||||
target_include_directories(libstudxml PUBLIC ${LIBSTUDXML_ROOT_DIR})
|
||||
|
||||
if(NOT LOCAL_EXPAT AND NOT LOCAL_DEPENDENCIES)
|
||||
find_package(EXPAT REQUIRED)
|
||||
target_compile_definitions(libstudxml PRIVATE LIBSTUDXML_EXTERNAL_EXPAT=1)
|
||||
target_link_libraries(libstudxml PRIVATE expat)
|
||||
endif()
|
||||
find_package(EXPAT REQUIRED)
|
||||
target_compile_definitions(libstudxml PRIVATE LIBSTUDXML_EXTERNAL_EXPAT=1)
|
||||
target_link_libraries(libstudxml PRIVATE expat)
|
||||
|
||||
if(NOT STATIC)
|
||||
set_target_properties(libstudxml PROPERTIES POSITION_INDEPENDENT_CODE 1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user