cmake_minimum_required(VERSION 3.18) project(EpistmoolServer LANGUAGES CXX) option(ENABLE_TESTS "Whether to enable doctest on the executable or not." OFF) set(CMAKE_AUTOMOC ON) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 6.2 COMPONENTS Core Network Sql REQUIRED) find_package(doctest REQUIRED) file(GLOB_RECURSE EpistmoolServer_SRC_HPP_FILES source/*.hpp) file(GLOB_RECURSE EpistmoolServer_SRC_CPP_FILES source/*.cpp) qt_add_executable(EpistmoolServer ${EpistmoolServer_SRC_HPP_FILES} ${EpistmoolServer_SRC_CPP_FILES} ) target_include_directories(EpistmoolServer PRIVATE source) target_compile_definitions(EpistmoolServer PRIVATE DOCTEST_CONFIG_DISABLE=$> ) target_link_libraries(EpistmoolServer PRIVATE # Qt6::Core handled for us by qt_add_executable Qt6::Network Qt6::Sql doctest::doctest )