replace botan with nss

This commit is contained in:
Thomas Fussell 2016-10-21 22:53:41 -04:00
parent fe30096963
commit 071f5962c2
5 changed files with 18 additions and 20 deletions

10
.gitmodules vendored
View File

@ -18,12 +18,12 @@
url = https://github.com/zeux/pugixml
branch = master
[submodule "third-party/botan"]
path = third-party/botan
url = https://github.com/randombit/botan
branch = master
[submodule "third-party/pole"]
path = third-party/pole
url = https://github.com/catlan/pole
branch = master
[submodule "third-party/nss"]
path = third-party/nss
url = https://github.com/tfussell/nss
branch = master

View File

@ -25,10 +25,7 @@ if(NOT BIN_DEST_DIR)
endif()
if(WITH_CRYPTO)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCRYPTO_ENABLED -DBOTAN_DLL= -D_ITERATOR_DEBUG_LEVEL=0")
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj -DNOMINMAX")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCRYPTO_ENABLED")
endif()
include_directories(include)
@ -38,7 +35,6 @@ include_directories(source/detail)
include_directories(third-party/miniz)
include_directories(third-party/libstudxml)
include_directories(third-party/utfcpp/source)
include_directories(third-party/botan)
include_directories(third-party/pole)
FILE(GLOB ROOT_HEADERS include/xlnt/*.hpp)
@ -74,16 +70,13 @@ set(SOURCES ${CELL_SOURCES} ${CHARTS_SOURCES} ${CHARTSHEET_SOURCES} ${DRAWING_SO
set(MINIZ ../third-party/miniz/miniz.c ../third-party/miniz/miniz.h)
set(LIBSTUDXML ../third-party/libstudxml/xml/parser.cxx ../third-party/libstudxml/xml/qname.cxx ../third-party/libstudxml/xml/serializer.cxx ../third-party/libstudxml/xml/value-traits.cxx ../third-party/libstudxml/xml/details/expat/xmlparse.c ../third-party/libstudxml/xml/details/expat/xmlrole.c ../third-party/libstudxml/xml/details/expat/xmltok_impl.c ../third-party/libstudxml/xml/details/expat/xmltok_ns.c ../third-party/libstudxml/xml/details/expat/xmltok.c ../third-party/libstudxml/xml/details/genx/char-props.c ../third-party/libstudxml/xml/details/genx/genx.c)
set(SOURCES ${SOURCES} ${MINIZ} ${LIBSTUDXML})
if(WITH_CRYPTO)
set(BOTAN ../third-party/botan/botan_all.cpp)
set(POLE ../third-party/pole/pole.cpp)
set(SOURCES ${SOURCES} ${BOTAN} ${POLE})
endif()
if(SHARED)
add_library(xlnt.shared SHARED ${HEADERS} ${SOURCES} ${MINIZ} ${LIBSTUDXML} ${BOTAN} ${POLE})
add_library(xlnt.shared SHARED ${HEADERS} ${SOURCES} ${MINIZ} ${LIBSTUDXML} ${POLE})
target_compile_definitions(xlnt.shared PRIVATE XLNT_SHARED=1 LIBSTUDXML_STATIC_LIB=1)
if(MSVC)
target_compile_definitions(xlnt.shared PRIVATE XLNT_EXPORT=1 _CRT_SECURE_NO_WARNINGS=1)
@ -122,7 +115,7 @@ if(SHARED)
endif()
if(STATIC)
add_library(xlnt.static STATIC ${HEADERS} ${SOURCES} ${MINIZ} ${LIBSTUDXML} ${BOTAN} ${POLE})
add_library(xlnt.static STATIC ${HEADERS} ${SOURCES} ${MINIZ} ${LIBSTUDXML} ${POLE})
target_compile_definitions(xlnt.static PUBLIC XLNT_STATIC=1)
target_compile_definitions(xlnt.static PRIVATE LIBSTUDXML_STATIC_LIB=1)
if(MSVC)

View File

@ -6,6 +6,11 @@ include_directories(tests)
include_directories(third-party/cxxtest)
include_directories(third-party/pugixml/src)
if(WITH_CRYPTO)
include_directories(third-party/nss/nspr/lib/ds third-party/nss/nspr/lib/libc/include third-party/nss/nspr/pr/include third-party/nss/nss/lib/base third-party/nss/nss/lib/certdb third-party/nss/nss/lib/certhigh third-party/nss/nss/lib/cryptohi third-party/nss/nss/lib/nss third-party/nss/nss/lib/pk11wrap third-party/nss/nss/lib/pkcs7 third-party/nss/nss/lib/smime third-party/nss/nss/lib/util)
link_directories(third-party/nss/build/lib)
endif()
FILE(GLOB CELL_TESTS source/cell/tests/test_*.hpp)
FILE(GLOB CHARTS_TESTS source/charts/tests/test_*.hpp)
FILE(GLOB CHARTSHEET_TESTS source/chartsheet/tests/test_*.hpp)
@ -54,11 +59,11 @@ endif()
if(MSVC)
set_target_properties(xlnt.test PROPERTIES COMPILE_FLAGS "/wd\"4251\" /wd\"4275\"")
endif()
# Needed for PathFileExists in path_helper (test helper)
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
# Needed for PathFileExists in path_helper
target_link_libraries(xlnt.test Shlwapi)
if(WITH_CRYPTO)
target_link_libraries(xlnt.test Ws2_32.lib Winmm.lib nss.lib)
endif()
endif()
add_custom_command(OUTPUT ${RUNNER}

1
third-party/botan vendored

@ -1 +0,0 @@
Subproject commit 35657e0f76931f0d3a333610e7065c81c35e9f1e

1
third-party/nss vendored Submodule

@ -0,0 +1 @@
Subproject commit 4cbd10b7e2f5a2b9179a316c5797c819e551e403