slint/examples/todo/cpp/CMakeLists.txt
Olivier Goffart a780dd4905 Testing: Fix duplicated accessibility element
This fix the C++ todo test that wasn't run because of a typo

When an element is optimized in another one, only the first one should
report the accessible properties. (because element with accessible
properties cannot be optimized so they are always the first)
2024-06-07 13:18:12 +02:00

23 lines
743 B
CMake

# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: MIT
cmake_minimum_required(VERSION 3.21)
project(slint_cpp_todo LANGUAGES CXX)
if (NOT TARGET Slint::Slint)
find_package(Slint REQUIRED)
endif()
add_library(todo_lib STATIC app.cpp)
slint_target_sources(todo_lib ../ui/todo.slint NAMESPACE todo_ui)
target_link_libraries(todo_lib PUBLIC Slint::Slint)
add_executable(todo main.cpp)
target_link_libraries(todo PRIVATE todo_lib)
if(SLINT_BUILD_TESTING AND SLINT_FEATURE_TESTING AND SLINT_FEATURE_EXPERIMENTAL)
add_executable(test_todo_basic tests/test_todo_basic.cpp)
target_link_libraries(test_todo_basic PRIVATE Catch2::Catch2 todo_lib)
add_test(NAME test_todo_basic COMMAND test_todo_basic)
endif()