# Library add_library("core" "src/disposition.cpp" "src/init.cpp" "src/participant.cpp" "src/settings.cpp" "src/turn_order.cpp" ) add_library("turns::core" ALIAS "core") target_compile_options("core" PUBLIC "$<$:-Wall>" "$<$:-Wextra>" "$<$:-Werror>" "$<$:-pedantic-errors>" ) if(NOT TURNS_USE_INSTALLED_SCHEMA_FILES) target_compile_definitions("core" PUBLIC "TURNS_SETTINGS_SCHEMA_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\"" ) endif() target_include_directories("core" PUBLIC "include" ) target_link_libraries("core" PUBLIC "PkgConfig::giomm" "PkgConfig::glibmm" "nlohmann_json::nlohmann_json" ) target_add_glib_schemas("core" SCHEMA_DIR "schemas" ) enable_coverage("core") install(FILES "schemas/ch.arknet.Turns.gschema.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/glib-2.0/schemas" ) # Tests add_executable("core-tests" "tests/glib_test_init.cpp" "tests/disposition.cpp" "tests/participant.cpp" "tests/turn_order_bugs.cpp" "tests/turn_order.cpp" ) target_link_libraries("core-tests" PRIVATE "Catch2::Catch2WithMain" "turns::core" ) target_link_options("core-tests" PRIVATE "$<$,$>:--coverage>" ) catch_discover_tests("core-tests")