From f597be870eec6d04de6bed0effa7dd23bcb72bf8 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 11 Jul 2024 13:17:03 +0200 Subject: initial commit --- res/CMakeLists.txt | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 res/CMakeLists.txt (limited to 'res/CMakeLists.txt') diff --git a/res/CMakeLists.txt b/res/CMakeLists.txt new file mode 100644 index 0000000..4969787 --- /dev/null +++ b/res/CMakeLists.txt @@ -0,0 +1,44 @@ +# Library + +add_library("res") + +target_add_glib_resources("res" + PREFIX "turns" + UI_FILES + "windows/main_window.ui" +) + +target_compile_options("res" PRIVATE + "$<$,$>:-fprofile-arcs>" + "$<$,$>:-ftest-coverage>" +) + +target_link_libraries("res" PUBLIC + "$<$,$>:gcov>" + + "PkgConfig::adwaita" + "PkgConfig::gtkmm" +) + +target_link_options("res" PRIVATE + "$<$,$>:--coverage>" +) + +add_library("turns::res" ALIAS "res") + +# Tests + +add_executable("res-tests" + "tests/main.cpp" + "tests/windows.cpp" +) + +target_link_libraries("res-tests" + "Catch2::Catch2" + + "$<$:-Wl,--whole-archive>" + "turns::res" + "$<$:-Wl,--no-whole-archive>" +) + +catch_discover_tests("res-tests") \ No newline at end of file -- cgit v1.2.3