set(CMAKE_AUTOMOC on)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Test Gui REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Test Gui)
remove_definitions(-DQT_NO_CAST_FROM_ASCII)

include_directories(..)

add_executable(screenManagerTest
        screen-manager-test.cpp
        ../src/screens-manager.cpp)

target_link_libraries(screenManagerTest PUBLIC
        Qt${QT_VERSION_MAJOR}::Core
        Qt${QT_VERSION_MAJOR}::Test
        Qt${QT_VERSION_MAJOR}::Gui
        )
add_test(screenManagerTest ${CMAKE_BINARY_DIR}/autotests/screenManagerTest)
