mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
clean up cmake lists
This commit is contained in:
parent
3883d8ae19
commit
0aa26019e2
|
@ -1,4 +1,4 @@
|
||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
project(xlnt_all)
|
project(xlnt_all)
|
||||||
|
|
||||||
# This indicates to CMakeLists in subdirectories that they are part of a larger project
|
# This indicates to CMakeLists in subdirectories that they are part of a larger project
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
project(xlnt.benchmarks)
|
project(xlnt.benchmarks)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
if(NOT COMBINED_PROJECT)
|
if(NOT COMBINED_PROJECT)
|
||||||
add_subdirectory(${LIBRARY_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/source)
|
add_subdirectory(${LIBRARY_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/source)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
project(xlnt.samples)
|
project(xlnt.samples)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
|
|
@ -1,22 +1,23 @@
|
||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
project(xlnt VERSION 0.9.3)
|
project(xlnt VERSION 0.9.3)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
set(PROJECT_VENDOR "Thomas Fussell")
|
set(PROJECT_VENDOR "Thomas Fussell")
|
||||||
set(PROJECT_CONTACT "thomas.fussell@gmail.com")
|
set(PROJECT_CONTACT "thomas.fussell@gmail.com")
|
||||||
set(PROJECT_URL "https://github.com/tfussell/xlnt")
|
set(PROJECT_URL "https://github.com/tfussell/xlnt")
|
||||||
set(PROJECT_DESCRIPTION "cross-platform user-friendly xlsx library for C++14")
|
set(PROJECT_DESCRIPTION "cross-platform user-friendly xlsx library for C++14")
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../third-party")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../third-party")
|
||||||
find_package(zlib)
|
|
||||||
find_package(CryptoPP)
|
find_package(ZLIB REQUIRED)
|
||||||
|
find_package(CryptoPP REQUIRED)
|
||||||
|
|
||||||
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)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
||||||
|
|
||||||
set(XLNT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
|
set(XLNT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
|
||||||
|
|
||||||
set(XLNT_INCLUDE_DIR ${XLNT_ROOT_DIR}/include)
|
set(XLNT_INCLUDE_DIR ${XLNT_ROOT_DIR}/include)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
project(xlnt.test)
|
project(xlnt.test)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
@ -8,8 +8,8 @@ if(NOT COMBINED_PROJECT)
|
||||||
add_subdirectory(${LIBRARY_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/source)
|
add_subdirectory(${LIBRARY_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/source)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(CxxTest)
|
find_package(CxxTest REQUIRED)
|
||||||
find_package(zlib)
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
file(GLOB CELL_TESTS ${CMAKE_CURRENT_SOURCE_DIR}/../source/cell/tests/test_*.hpp)
|
file(GLOB CELL_TESTS ${CMAKE_CURRENT_SOURCE_DIR}/../source/cell/tests/test_*.hpp)
|
||||||
file(GLOB CHARTS_TESTS ${CMAKE_CURRENT_SOURCE_DIR}/../source/charts/tests/test_*.hpp)
|
file(GLOB CHARTS_TESTS ${CMAKE_CURRENT_SOURCE_DIR}/../source/charts/tests/test_*.hpp)
|
||||||
|
|
5
third-party/cryptopp/CMakeLists.txt
vendored
5
third-party/cryptopp/CMakeLists.txt
vendored
|
@ -1,6 +1,9 @@
|
||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
project(cryptopp)
|
project(cryptopp)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
ExternalProject_Add(cryptopp-download
|
ExternalProject_Add(cryptopp-download
|
||||||
GIT_REPOSITORY https://github.com/weidai11/cryptopp
|
GIT_REPOSITORY https://github.com/weidai11/cryptopp
|
||||||
|
|
3
third-party/cxxtest/CMakeLists.txt
vendored
3
third-party/cxxtest/CMakeLists.txt
vendored
|
@ -1,6 +1,9 @@
|
||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
project(cxxtest)
|
project(cxxtest)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
ExternalProject_Add(cxxtest-download
|
ExternalProject_Add(cxxtest-download
|
||||||
GIT_REPOSITORY https://github.com/CxxTest/cxxtest
|
GIT_REPOSITORY https://github.com/CxxTest/cxxtest
|
||||||
|
|
6
third-party/libstudxml/CMakeLists.txt
vendored
6
third-party/libstudxml/CMakeLists.txt
vendored
|
@ -1,6 +1,9 @@
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
project(libstudxml)
|
project(libstudxml)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
set(LIBSTUDXML_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
set(LIBSTUDXML_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
set(LIBSTUDXML_INCLUDE_DIR ${LIBSTUDXML_ROOT_DIR})
|
set(LIBSTUDXML_INCLUDE_DIR ${LIBSTUDXML_ROOT_DIR})
|
||||||
|
|
||||||
|
@ -48,9 +51,8 @@ add_library(libstudxml STATIC ${LIBSTUDXML} ${GENX} ${EXPAT})
|
||||||
target_compile_definitions(libstudxml PUBLIC LIBSTUDXML_STATIC_LIB=1)
|
target_compile_definitions(libstudxml PUBLIC LIBSTUDXML_STATIC_LIB=1)
|
||||||
target_include_directories(libstudxml PUBLIC ${LIBSTUDXML_ROOT_DIR})
|
target_include_directories(libstudxml PUBLIC ${LIBSTUDXML_ROOT_DIR})
|
||||||
|
|
||||||
find_package(expat)
|
|
||||||
|
|
||||||
if(NOT BUILD_DEPS)
|
if(NOT BUILD_DEPS)
|
||||||
|
find_package(EXPAT REQUIRED)
|
||||||
target_compile_definitions(libstudxml PRIVATE LIBSTUDXML_EXTERNAL_EXPAT=1)
|
target_compile_definitions(libstudxml PRIVATE LIBSTUDXML_EXTERNAL_EXPAT=1)
|
||||||
target_link_libraries(libstudxml PRIVATE expat)
|
target_link_libraries(libstudxml PRIVATE expat)
|
||||||
endif()
|
endif()
|
||||||
|
|
5
third-party/zlib/CMakeLists.txt
vendored
5
third-party/zlib/CMakeLists.txt
vendored
|
@ -1,6 +1,9 @@
|
||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
project(zlib)
|
project(zlib)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
ExternalProject_Add(zlib-download
|
ExternalProject_Add(zlib-download
|
||||||
GIT_REPOSITORY https://github.com/madler/zlib
|
GIT_REPOSITORY https://github.com/madler/zlib
|
||||||
|
|
Loading…
Reference in New Issue
Block a user