xlnt/CMakeLists.txt

38 lines
1.0 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.1)
2016-10-28 06:40:20 +08:00
set(LIBRARY_NAME xlnt)
project(${LIBRARY_NAME}_all VERSION ${LIBRARY_VERSION} LANGUAGES CXX C)
2015-11-03 03:22:13 +08:00
2016-10-28 06:40:20 +08:00
# This indicates to CMakeLists in subdirectories that they are part of a larger project
set(COMBINED_PROJECT 1)
# Library type
2016-10-28 06:40:20 +08:00
option(STATIC "Set to ON to build ${PROJECT_NAME} as a static library instead of a shared library" OFF)
# Optional components
2016-10-28 06:40:20 +08: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)
# Platform specific options
if(NOT MSVC)
2016-10-28 06:40:20 +08:00
option(COVERAGE "Generate coverage data using gcov" OFF)
2015-10-27 04:54:21 +08:00
endif()
# Add components according to selected options
2016-10-28 06:40:20 +08:00
if(SAMPLES)
add_subdirectory(samples)
endif()
2015-10-15 01:16:25 +08:00
2016-10-28 06:40:20 +08:00
if(BENCHMARKS)
add_subdirectory(benchmarks)
endif()
find_package(PythonInterp)
if(PYTHONINTERP_FOUND)
add_subdirectory(tests)
else()
message("Python couldn't be found in the current PATH but is required for building tests. Tests will be skipped for now.")
endif()
add_subdirectory(source)