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)
find_package(qt5xdg)
remove_definitions(-DQT_NO_CAST_FROM_ASCII)

include_directories(..)

add_executable(iconLoaderTest
        icon-loader-test.cpp
        ../icon-loader.cpp)

target_link_libraries(iconLoaderTest PUBLIC
        Qt${QT_VERSION_MAJOR}::Core
        Qt${QT_VERSION_MAJOR}::Test
        Qt${QT_VERSION_MAJOR}::Gui
        ukui-search
        Qt5Xdg
        )
add_test(iconLoaderTest ${CMAKE_BINARY_DIR}/autotests/iconLoaderTest)
