2022-07-05 11:26:52 +00:00
|
|
|
# Copyright (C) 2022 The Qt Company Ltd.
|
2022-08-19 13:21:34 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2022-07-05 11:26:52 +00:00
|
|
|
|
2019-10-08 14:30:21 +00:00
|
|
|
#####################################################################
|
|
|
|
## tst_qicon Test:
|
|
|
|
#####################################################################
|
|
|
|
|
2023-06-29 15:27:04 +00:00
|
|
|
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
|
|
|
|
cmake_minimum_required(VERSION 3.16)
|
|
|
|
project(tst_qicon LANGUAGES CXX)
|
|
|
|
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
|
|
|
|
endif()
|
|
|
|
|
2019-10-08 14:30:21 +00:00
|
|
|
# Collect test data
|
|
|
|
file(GLOB_RECURSE test_data_glob
|
|
|
|
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
icons/*)
|
|
|
|
list(APPEND test_data ${test_data_glob})
|
|
|
|
file(GLOB_RECURSE test_data_glob
|
|
|
|
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
second_icons/*)
|
|
|
|
list(APPEND test_data ${test_data_glob})
|
|
|
|
file(GLOB_RECURSE test_data_glob
|
|
|
|
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
fallback_icons/*)
|
|
|
|
list(APPEND test_data ${test_data_glob})
|
|
|
|
file(GLOB_RECURSE test_data_glob
|
|
|
|
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
*.png)
|
|
|
|
list(APPEND test_data ${test_data_glob})
|
|
|
|
file(GLOB_RECURSE test_data_glob
|
|
|
|
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
*.svg)
|
|
|
|
list(APPEND test_data ${test_data_glob})
|
|
|
|
file(GLOB_RECURSE test_data_glob
|
|
|
|
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
*.svgz)
|
|
|
|
list(APPEND test_data ${test_data_glob})
|
|
|
|
|
2020-09-22 08:16:58 +00:00
|
|
|
qt_internal_add_test(tst_qicon
|
2019-10-08 14:30:21 +00:00
|
|
|
SOURCES
|
|
|
|
tst_qicon.cpp
|
2022-07-25 15:50:38 +00:00
|
|
|
LIBRARIES
|
2019-10-08 14:30:21 +00:00
|
|
|
Qt::Gui
|
|
|
|
TESTDATA ${test_data}
|
|
|
|
)
|
|
|
|
|
|
|
|
# Resources:
|
|
|
|
set(tst_qicon_resource_files
|
|
|
|
"./fallback_icons/red.png"
|
|
|
|
"./icons/testtheme/16x16/actions/appointment-new.png"
|
|
|
|
"./icons/testtheme/22x22/actions/appointment-new.png"
|
|
|
|
"./icons/testtheme/index.theme"
|
|
|
|
"./icons/testtheme/scalable/actions/svg-only.svg"
|
|
|
|
"./icons/themeparent/16x16/actions/address-book-new.png"
|
|
|
|
"./icons/themeparent/16x16/actions/appointment-new.png"
|
|
|
|
"./icons/themeparent/22x22/actions/address-book-new.png"
|
|
|
|
"./icons/themeparent/22x22/actions/appointment-new.png"
|
|
|
|
"./icons/themeparent/32x32/actions/address-book-new.png"
|
|
|
|
"./icons/themeparent/32x32/actions/appointment-new.png"
|
|
|
|
"./icons/themeparent/icon-theme.cache"
|
|
|
|
"./icons/themeparent/index.theme"
|
|
|
|
"./icons/themeparent/scalable/actions/address-book-new.svg"
|
|
|
|
"./icons/themeparent/scalable/actions/appointment-new.svg"
|
2023-05-11 13:31:22 +00:00
|
|
|
"./icons/fallbacktheme/index.theme"
|
|
|
|
"./icons/fallbacktheme/16x16/edit-cut.png"
|
2023-05-10 08:25:02 +00:00
|
|
|
"./icons/hicolor/index.theme"
|
|
|
|
"./icons/hicolor/16x16/hicolor-icon.png"
|
2019-10-08 14:30:21 +00:00
|
|
|
"./second_icons/testtheme/32x32/actions/appointment-new.png"
|
|
|
|
"./styles/commonstyle/images/standardbutton-open-128.png"
|
|
|
|
"./styles/commonstyle/images/standardbutton-open-16.png"
|
|
|
|
"./styles/commonstyle/images/standardbutton-open-32.png"
|
2020-07-29 21:35:47 +00:00
|
|
|
"./styles/commonstyle/images/standardbutton-open-64.png"
|
2019-10-08 14:30:21 +00:00
|
|
|
"./styles/commonstyle/images/standardbutton-save-128.png"
|
|
|
|
"./styles/commonstyle/images/standardbutton-save-16.png"
|
|
|
|
"./styles/commonstyle/images/standardbutton-save-32.png"
|
2020-07-29 21:35:47 +00:00
|
|
|
"./styles/commonstyle/images/standardbutton-save-64.png"
|
2019-10-08 14:30:21 +00:00
|
|
|
"image.png"
|
|
|
|
"rect.png"
|
|
|
|
"tst_qicon.cpp"
|
|
|
|
)
|
|
|
|
|
2020-09-22 08:16:58 +00:00
|
|
|
qt_internal_add_resource(tst_qicon "tst_qicon"
|
2019-10-08 14:30:21 +00:00
|
|
|
PREFIX
|
|
|
|
"/"
|
|
|
|
FILES
|
|
|
|
${tst_qicon_resource_files}
|
|
|
|
)
|
|
|
|
set(qmake_immediate_resource_files
|
|
|
|
"tst_qicon.cpp"
|
|
|
|
)
|
|
|
|
|
2020-09-22 08:16:58 +00:00
|
|
|
qt_internal_add_resource(tst_qicon "qmake_immediate"
|
2019-10-08 14:30:21 +00:00
|
|
|
PREFIX
|
|
|
|
"/"
|
|
|
|
FILES
|
|
|
|
${qmake_immediate_resource_files}
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
## Scopes:
|
|
|
|
#####################################################################
|
|
|
|
|
2020-09-22 08:16:58 +00:00
|
|
|
qt_internal_extend_target(tst_qicon CONDITION TARGET Qt::Widgets
|
2022-07-25 15:50:38 +00:00
|
|
|
LIBRARIES
|
2019-10-08 14:30:21 +00:00
|
|
|
Qt::Widgets
|
|
|
|
)
|