2023-01-31 12:31:12 +00:00
|
|
|
cmake_minimum_required(VERSION 3.2)
|
|
|
|
|
|
|
|
project(DOtherSide)
|
|
|
|
|
2020-05-25 00:22:41 +00:00
|
|
|
option(ENABLE_DOCS "Enable docs" ON)
|
|
|
|
option(ENABLE_TESTS "Enable tests" ON)
|
|
|
|
option(ENABLE_DYNAMIC_LIBS "Enable dynamic libraries" ON)
|
|
|
|
option(ENABLE_STATIC_LIBS "Enable static libraries" ON)
|
|
|
|
|
2023-01-31 12:31:12 +00:00
|
|
|
# Add additional source path for cmake
|
|
|
|
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/)
|
|
|
|
|
|
|
|
# Add strict warning checking for C++
|
|
|
|
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
# Add Coverage option
|
|
|
|
option(ENABLE_COVERAGE "Enable coverage" OFF)
|
|
|
|
|
|
|
|
add_compile_options(-Wall -Wno-long-long -pedantic)
|
|
|
|
|
|
|
|
if (ENABLE_COVERAGE)
|
|
|
|
message(STATUS "Enabling coverage")
|
|
|
|
set(CMAKE_BUILD_TYPE Debug)
|
|
|
|
add_compile_options(-g -O0 --coverage)
|
2020-05-25 00:22:41 +00:00
|
|
|
add_link_options(--coverage)
|
2023-01-31 12:31:12 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2022-07-20 10:59:31 +00:00
|
|
|
add_subdirectory(vendor/SortFilterProxyModel)
|
2023-01-31 12:31:12 +00:00
|
|
|
add_subdirectory(lib)
|
2020-05-25 00:22:41 +00:00
|
|
|
|
|
|
|
if(ENABLE_DOCS)
|
|
|
|
add_subdirectory(doc)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ENABLE_TESTS)
|
|
|
|
add_subdirectory(test)
|
|
|
|
endif()
|
|
|
|
|