blob: 517de358ed157692ba702594329cd2a5d2fb099d (
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)
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=$<NOT:$<BOOL:${ENABLE_TESTS}>>
)
target_link_libraries(EpistmoolServer PRIVATE
# Qt6::Core handled for us by qt_add_executable
Qt6::Network
Qt6::Sql
doctest::doctest
)
|