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 --- ui/CMakeLists.txt | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 ui/CMakeLists.txt (limited to 'ui/CMakeLists.txt') diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt new file mode 100644 index 0000000..e3d8941 --- /dev/null +++ b/ui/CMakeLists.txt @@ -0,0 +1,60 @@ +# Library + +add_library("ui" + "src/widgets/participant_row.cpp" + "src/widgets/turn_order_view.cpp" + "src/windows/participant_editor.cpp" + "src/windows/tracker.cpp" + + $ +) + +add_library("turns::ui" ALIAS "ui") + +target_compile_options("ui" PUBLIC + "$<$:-Wall>" + "$<$:-Wextra>" + "$<$:-Werror>" + "$<$:-pedantic-errors>" +) + +target_include_directories("ui" PUBLIC + "include" +) + +target_link_libraries("ui" PUBLIC + "turns::core" + "turns::lang" + "PkgConfig::adwaita" + "PkgConfig::gtkmm" +) + +enable_coverage("ui") + +# Resources + +add_subdirectory("res") + +# Tests + +add_executable("ui-tests" + "tests/widgets/participant_row.cpp" + "tests/windows/participant_editor.cpp" + "tests/windows/resources.cpp" + "tests/windows/tracker.cpp" +) + +target_link_libraries("ui-tests" PRIVATE + "Catch2::Catch2" + + "$<$:-Wl,--whole-archive>" + "turns::ui" + "$<$:-Wl,--no-whole-archive>" + "turns::gtk-test-main" +) + +target_link_options("ui-tests" PRIVATE + "$<$,$>:--coverage>" +) + +catch_discover_tests("ui-tests") -- cgit v1.2.3