aboutsummaryrefslogtreecommitdiff
path: root/server-v1/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'server-v1/CMakeLists.txt')
-rw-r--r--server-v1/CMakeLists.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/server-v1/CMakeLists.txt b/server-v1/CMakeLists.txt
new file mode 100644
index 0000000..d869f82
--- /dev/null
+++ b/server-v1/CMakeLists.txt
@@ -0,0 +1,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
+)