2023-02-07 11:54:31 +00:00
|
|
|
cmake_minimum_required(VERSION 3.19)
|
2023-01-31 12:31:12 +00:00
|
|
|
|
|
|
|
project(DOtherSide)
|
|
|
|
|
2022-12-07 10:31:28 +00:00
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
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()
|
|
|
|
|
2023-03-07 16:08:38 +00:00
|
|
|
add_subdirectory(../../ui/StatusQ/vendor/qzxing/src qzxing)
|
2023-02-02 13:56:09 +00:00
|
|
|
add_subdirectory(../../ui/StatusQ/vendor/SortFilterProxyModel 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()
|
|
|
|
|