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")