2016-10-10 07:28:49 -04:00
|
|
|
cmake_minimum_required(VERSION 3.1)
|
2016-10-27 18:40:20 -04:00
|
|
|
set(LIBRARY_NAME xlnt)
|
|
|
|
project(${LIBRARY_NAME}_all VERSION ${LIBRARY_VERSION} LANGUAGES CXX C)
|
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
|
|
|
|
set(COMBINED_PROJECT 1)
|
2016-10-25 20:21:58 -04:00
|
|
|
|
|
|
|
# Library type
|
2016-10-27 18:40:20 -04:00
|
|
|
option(STATIC "Set to ON to build ${PROJECT_NAME} as a static library instead of a shared library" OFF)
|
2016-10-25 20:21:58 -04:00
|
|
|
|
|
|
|
# Optional components
|
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)
|
2016-10-25 20:21:58 -04:00
|
|
|
|
|
|
|
# Platform specific options
|
|
|
|
if(NOT MSVC)
|
2016-10-27 18:40:20 -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)
|
2016-10-25 20:21:58 -04:00
|
|
|
add_subdirectory(samples)
|
|
|
|
endif()
|
2015-10-14 13:16:25 -04:00
|
|
|
|
2016-10-27 18:40:20 -04:00
|
|
|
if(BENCHMARKS)
|
2016-10-25 20:21:58 -04:00
|
|
|
add_subdirectory(benchmarks)
|
2015-11-03 23:02:43 -05:00
|
|
|
endif()
|
|
|
|
|
2016-10-25 20:21:58 -04:00
|
|
|
add_subdirectory(tests)
|
|
|
|
add_subdirectory(source)
|