From 3f5499cebc06356ed99159be3fb9676292cf7b8b Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 24 Jul 2024 10:44:13 +0200 Subject: turns: rename domain to core --- core/CMakeLists.txt | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 core/CMakeLists.txt (limited to 'core/CMakeLists.txt') diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt new file mode 100644 index 0000000..785421c --- /dev/null +++ b/core/CMakeLists.txt @@ -0,0 +1,57 @@ +set(COMPONENT "core") + +# Library + +add_library("${COMPONENT}" + "src/disposition.cpp" + "src/participant.cpp" + "src/turn_order.cpp" +) + +add_library("turns::${COMPONENT}" ALIAS "${COMPONENT}") + + +target_compile_options("${COMPONENT}" PUBLIC + "$<$:-Wall>" + "$<$:-Wextra>" + "$<$:-Werror>" + "$<$:-pedantic-errors>" + PRIVATE + "$<$,$>:-fprofile-arcs>" + "$<$,$>:-ftest-coverage>" +) + +target_include_directories("${COMPONENT}" PUBLIC + "include" +) + +target_link_libraries("${COMPONENT}" PUBLIC + "$<$,$>:gcov>" + + "PkgConfig::giomm" + "PkgConfig::glibmm" +) + +target_link_options("${COMPONENT}" PRIVATE + "$<$,$>:--coverage>" +) + +# Tests + +add_executable("${COMPONENT}-tests" + "tests/register_types.cpp" + + "tests/disposition.cpp" + "tests/participant.cpp" + "tests/turn_order_bugs.cpp" + "tests/turn_order.cpp" +) + +target_link_libraries("${COMPONENT}-tests" + "Catch2::Catch2" + + "turns::core" + "turns::glib-test-main" +) + +catch_discover_tests("${COMPONENT}-tests") \ No newline at end of file -- cgit v1.2.3