From 4e555fdbda6b9f5ea6c3dc29e16b992a0fe6e556 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 29 May 2025 12:31:54 +0200 Subject: gui: reintroduce basic testing skeleton --- gui/CMakeLists.txt | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'gui/CMakeLists.txt') diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 3753979..928ff1a 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -74,8 +74,17 @@ target_include_directories("gui_impl" PUBLIC target_link_libraries("gui_impl" PUBLIC "resources" + "adwaitamm::adwaitamm" + "turns::mm" + + "PkgConfig::glib" + "PkgConfig::glibmm" + + "$<$:-Wl,--whole-archive>" + "resources" + "$<$:-Wl,--no-whole-archive>" ) target_compile_definitions("gui_impl" PUBLIC @@ -100,15 +109,6 @@ target_include_directories("gui" PUBLIC target_link_libraries("gui" PUBLIC "gui_impl" - - "adwaitamm::adwaitamm" - "PkgConfig::glib" - "PkgConfig::glibmm" - "turns::mm" - - "$<$:-Wl,--whole-archive>" - "resources" - "$<$:-Wl,--no-whole-archive>" ) set_target_properties("gui" PROPERTIES @@ -139,3 +139,18 @@ install(FILES ) install(TARGETS "gui") + +# Tests + +add_executable("gui-tests" + "tests/gtk-test.cpp" +) + +target_link_libraries("gui-tests" PRIVATE + "gui_impl" + "Catch2::Catch2WithMain" +) + +target_compile_definitions("resources" PUBLIC + "TESTLOCALEDIR=\"${CMAKE_CURRENT_BINARY_DIR}/locale>\"" +) \ No newline at end of file -- cgit v1.2.3