From 4d0a7d99ebf55ad2d0e583759699b8b4d77a7907 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 24 Jul 2024 13:23:55 +0200 Subject: app: move ui code to ui library --- core/CMakeLists.txt | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) (limited to 'core') 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 "$<$:-Wall>" "$<$:-Wextra>" "$<$:-Werror>" "$<$:-pedantic-errors>" - PRIVATE - "$<$,$>:-fprofile-arcs>" - "$<$,$>:-ftest-coverage>" ) -target_include_directories("${COMPONENT}" PUBLIC +target_include_directories("core" PUBLIC "include" ) -target_link_libraries("${COMPONENT}" PUBLIC - "$<$,$>:gcov>" - +target_link_libraries("core" PUBLIC "PkgConfig::giomm" "PkgConfig::glibmm" ) -target_link_options("${COMPONENT}" PRIVATE - "$<$,$>:--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 + "$<$,$>:--coverage>" +) + +catch_discover_tests("core-tests") \ No newline at end of file -- cgit v1.2.3