summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/CMakeLists.txt40
1 files changed, 22 insertions, 18 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index 7e3edf7..39efaf4 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -1,6 +1,8 @@
# SPDX-FileCopyrightText: 2025 Felix Morgner <felix.morgner@gmail.com>
# SPDX-License-Identifier: LGPL-2.1-only
+option(TURNS_ENABLE_GUI_TESTS "Enable building and execution of the GUI tests" ON)
+
find_package("Gettext" REQUIRED)
# Resources
@@ -156,25 +158,27 @@ install(TARGETS "gui")
# Tests
-add_executable("gui-tests"
- "tests/main.cpp"
- "tests/messages.cpp"
- "tests/participant_editor.cpp"
- "tests/participant_row.cpp"
- "tests/resources.cpp"
-)
+if(TURNS_ENABLE_GUI_TESTS)
+ add_executable("gui-tests"
+ "tests/main.cpp"
+ "tests/messages.cpp"
+ "tests/participant_editor.cpp"
+ "tests/participant_row.cpp"
+ "tests/resources.cpp"
+ )
-target_link_libraries("gui-tests" PRIVATE
- "gui_impl"
- "Catch2::Catch2"
+ target_link_libraries("gui-tests" PRIVATE
+ "gui_impl"
+ "Catch2::Catch2"
- "$<$<CXX_COMPILER_ID:GNU,Clang>:-Wl,--whole-archive>"
- "resources"
- "$<$<CXX_COMPILER_ID:GNU,Clang>:-Wl,--no-whole-archive>"
-)
+ "$<$<CXX_COMPILER_ID:GNU,Clang>:-Wl,--whole-archive>"
+ "resources"
+ "$<$<CXX_COMPILER_ID:GNU,Clang>:-Wl,--no-whole-archive>"
+ )
-target_compile_definitions("resources" PUBLIC
- "TESTLOCALEDIR=\"${CMAKE_CURRENT_BINARY_DIR}/locale\""
-)
+ target_compile_definitions("resources" PUBLIC
+ "TESTLOCALEDIR=\"${CMAKE_CURRENT_BINARY_DIR}/locale\""
+ )
-catch_discover_tests("gui-tests") \ No newline at end of file
+ catch_discover_tests("gui-tests")
+endif() \ No newline at end of file