blob: d869f8250f708cbdbc1eb489291bfeb54f8555cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
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)
qt_add_executable(EpistmoolServer
source/all_fwd.hpp
source/header_only.cpp
source/main.cpp
)
add_subdirectory(source/EpistmoolServer)
target_include_directories(EpistmoolServer PRIVATE source)
target_compile_definitions(EpistmoolServer PRIVATE
DOCTEST_CONFIG_DISABLE=$<NOT:$<BOOL:${ENABLE_TESTS}>>
)
target_link_libraries(EpistmoolServer PRIVATE
# Qt6::Core handled for us by qt_add_executable
Qt6::Network
Qt6::Sql
doctest::doctest
)
|