mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
fix msvc build with some defines
This commit is contained in:
parent
836e544fa8
commit
886605d643
|
@ -16,6 +16,7 @@ ExternalProject_Add(cryptopp
|
||||||
CONFIGURE_COMMAND ""
|
CONFIGURE_COMMAND ""
|
||||||
BUILD_COMMAND "")
|
BUILD_COMMAND "")
|
||||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../third-party/cryptopp ${CMAKE_CURRENT_BINARY_DIR}/cryptopp EXCLUDE_FROM_ALL)
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../third-party/cryptopp ${CMAKE_CURRENT_BINARY_DIR}/cryptopp EXCLUDE_FROM_ALL)
|
||||||
|
target_compile_definitions(cryptopp-object PRIVATE NO_OS_DEPENDENCE=1)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
option(FRAMEWORK "Set to ON to package dylib and headers into a .framework, OSX only" OFF)
|
option(FRAMEWORK "Set to ON to package dylib and headers into a .framework, OSX only" OFF)
|
||||||
|
|
|
@ -38,17 +38,18 @@ set(TESTS ${CELL_TESTS} ${CHARTS_TESTS} ${CHARTSHEET_TESTS} ${DRAWING_TESTS}
|
||||||
file(GLOB TEST_HELPERS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/helpers/*.hpp)
|
file(GLOB TEST_HELPERS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/helpers/*.hpp)
|
||||||
file(GLOB TEST_HELPERS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/helpers/*.cpp)
|
file(GLOB TEST_HELPERS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/helpers/*.cpp)
|
||||||
|
|
||||||
SET(TEST_HELPERS ${TEST_HELPERS_HEADERS} ${TEST_HELPERS_SOURCES})
|
set(TEST_HELPERS ${TEST_HELPERS_HEADERS} ${TEST_HELPERS_SOURCES})
|
||||||
|
|
||||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/tests")
|
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/tests")
|
||||||
set(RUNNER "${CMAKE_CURRENT_BINARY_DIR}/runner-autogen.cpp")
|
set(RUNNER "${CMAKE_CURRENT_BINARY_DIR}/runner-autogen.cpp")
|
||||||
set_source_files_properties(${RUNNER} PROPERTIES GENERATED TRUE)
|
set_source_files_properties(${RUNNER} PROPERTIES GENERATED TRUE)
|
||||||
|
|
||||||
if(COVERAGE)
|
if(COVERAGE)
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov --coverage")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov --coverage")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} ${TEST_HELPERS} ${TESTS} ${RUNNER} $<TARGET_OBJECTS:xlnt.third-party> ${XLNT_ZIP})
|
add_executable(${PROJECT_NAME} ${TEST_HELPERS} ${TESTS} ${RUNNER} $<TARGET_OBJECTS:xlnt.third-party> ${XLNT_ZIP})
|
||||||
|
target_compile_definitions(${PROJECT_NAME} PRIVATE LIBSTUDXML_STATIC_LIB=1)
|
||||||
|
|
||||||
source_group(helpers FILES ${TEST_HELPERS})
|
source_group(helpers FILES ${TEST_HELPERS})
|
||||||
source_group(xlnt\\detail FILES ${XLNT_ZIP})
|
source_group(xlnt\\detail FILES ${XLNT_ZIP})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user