29 lines
880 B
CMake
29 lines
880 B
CMake
cmake_minimum_required(VERSION 3.10)
|
|
|
|
# set the project name
|
|
project(NotesTK)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
|
|
|
|
set_property( GLOBAL PROPERTY USE_FOLDERS ON)
|
|
set (CMAKE_MODULE_PATH infra/cmake)
|
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
if(MSVC)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
|
|
elseif(FALSE)
|
|
set(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage")
|
|
set(GCC_COVERAGE_LINK_FLAGS "-lgcov")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
|
|
endif()
|
|
|
|
add_subdirectory(src)
|
|
add_subdirectory(test)
|
|
add_subdirectory(plugins)
|
|
add_subdirectory(apps)
|