summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2024-07-24 13:23:55 +0200
committerFelix Morgner <felix.morgner@gmail.com>2024-07-24 13:23:55 +0200
commit4d0a7d99ebf55ad2d0e583759699b8b4d77a7907 (patch)
tree302a2661c5ae099129db40c75cbadf6b5e8c9bd4 /core
parentf3317ddcaa8af0fb7b4be475dc97ef0649d1975b (diff)
downloadturns-4d0a7d99ebf55ad2d0e583759699b8b4d77a7907.tar.xz
turns-4d0a7d99ebf55ad2d0e583759699b8b4d77a7907.zip
app: move ui code to ui library
Diffstat (limited to 'core')
-rw-r--r--core/CMakeLists.txt32
1 files changed, 13 insertions, 19 deletions
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index 785421c..4928843 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -1,44 +1,34 @@
-set(COMPONENT "core")
-
# Library
-add_library("${COMPONENT}"
+add_library("core"
"src/disposition.cpp"
"src/participant.cpp"
"src/turn_order.cpp"
)
-add_library("turns::${COMPONENT}" ALIAS "${COMPONENT}")
-
+add_library("turns::core" ALIAS "core")
-target_compile_options("${COMPONENT}" PUBLIC
+target_compile_options("core" PUBLIC
"$<$<CXX_COMPILER_ID:GNU,Clang>:-Wall>"
"$<$<CXX_COMPILER_ID:GNU,Clang>:-Wextra>"
"$<$<CXX_COMPILER_ID:GNU,Clang>:-Werror>"
"$<$<CXX_COMPILER_ID:GNU,Clang>:-pedantic-errors>"
- PRIVATE
- "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:-fprofile-arcs>"
- "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:-ftest-coverage>"
)
-target_include_directories("${COMPONENT}" PUBLIC
+target_include_directories("core" PUBLIC
"include"
)
-target_link_libraries("${COMPONENT}" PUBLIC
- "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:gcov>"
-
+target_link_libraries("core" PUBLIC
"PkgConfig::giomm"
"PkgConfig::glibmm"
)
-target_link_options("${COMPONENT}" PRIVATE
- "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:--coverage>"
-)
+enable_coverage("core")
# Tests
-add_executable("${COMPONENT}-tests"
+add_executable("core-tests"
"tests/register_types.cpp"
"tests/disposition.cpp"
@@ -47,11 +37,15 @@ add_executable("${COMPONENT}-tests"
"tests/turn_order.cpp"
)
-target_link_libraries("${COMPONENT}-tests"
+target_link_libraries("core-tests" PRIVATE
"Catch2::Catch2"
"turns::core"
"turns::glib-test-main"
)
-catch_discover_tests("${COMPONENT}-tests") \ No newline at end of file
+target_link_options("core-tests" PRIVATE
+ "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:--coverage>"
+)
+
+catch_discover_tests("core-tests") \ No newline at end of file