2017-09-08 14:33:18 -04:00
|
|
|
cmake_minimum_required(VERSION 3.1)
|
2017-01-21 09:04:10 -05:00
|
|
|
project(xlnt_all)
|
2015-11-02 14:22:13 -05:00
|
|
|
|
2016-10-27 18:40:20 -04:00
|
|
|
# This indicates to CMakeLists in subdirectories that they are part of a larger project
|
2017-01-21 09:04:10 -05:00
|
|
|
set(COMBINED_PROJECT TRUE)
|
2016-10-25 20:21:58 -04:00
|
|
|
|
|
|
|
# Library type
|
2017-03-10 18:33:20 -05:00
|
|
|
option(STATIC "Set to ON to build xlnt as a static library instead of a shared library" OFF)
|
2016-10-25 20:21:58 -04:00
|
|
|
|
|
|
|
# Optional components
|
2017-03-18 21:30:26 -04:00
|
|
|
option(TESTS "Set to OFF to skip building test executable (in ./tests)" ON)
|
2016-10-27 18:40:20 -04:00
|
|
|
option(SAMPLES "Set to ON to build executable code samples (in ./samples)" OFF)
|
|
|
|
option(BENCHMARKS "Set to ON to build performance benchmarks (in ./benchmarks)" OFF)
|
2017-09-08 14:33:18 -04:00
|
|
|
option(PYTHON "Set to ON to build Arrow conversion functions (in ./python)" OFF)
|
2016-10-25 20:21:58 -04:00
|
|
|
|
|
|
|
# Platform specific options
|
2017-09-13 10:20:51 -04:00
|
|
|
if(MSVC)
|
|
|
|
option(STATIC_CRT "Link with the static version of MSVCRT (/MD[d])" OFF)
|
|
|
|
else()
|
2017-09-08 14:33:18 -04:00
|
|
|
option(COVERAGE "Generate coverage data using gcov" OFF)
|
2015-10-26 16:54:21 -04:00
|
|
|
endif()
|
|
|
|
|
2016-10-25 20:21:58 -04:00
|
|
|
# Add components according to selected options
|
2016-10-27 18:40:20 -04:00
|
|
|
if(SAMPLES)
|
2017-09-08 14:33:18 -04:00
|
|
|
add_subdirectory(samples)
|
2016-10-25 20:21:58 -04:00
|
|
|
endif()
|
2015-10-14 13:16:25 -04:00
|
|
|
|
2016-10-27 18:40:20 -04:00
|
|
|
if(BENCHMARKS)
|
2017-09-08 14:33:18 -04:00
|
|
|
add_subdirectory(benchmarks)
|
2015-11-03 23:02:43 -05:00
|
|
|
endif()
|
|
|
|
|
2017-03-18 21:30:26 -04:00
|
|
|
if(TESTS)
|
2017-09-08 14:33:18 -04:00
|
|
|
add_subdirectory(tests)
|
2016-12-14 08:27:09 +00:00
|
|
|
endif()
|
|
|
|
|
2017-07-30 09:48:57 -07:00
|
|
|
if(PYTHON)
|
2017-09-08 14:33:18 -04:00
|
|
|
add_subdirectory(python)
|
2017-07-01 10:46:48 -04:00
|
|
|
endif()
|
|
|
|
|
2016-10-25 20:21:58 -04:00
|
|
|
add_subdirectory(source)
|