summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qresourceengine/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/io/qresourceengine/CMakeLists.txt')
-rw-r--r--tests/auto/corelib/io/qresourceengine/CMakeLists.txt18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/auto/corelib/io/qresourceengine/CMakeLists.txt b/tests/auto/corelib/io/qresourceengine/CMakeLists.txt
index b6b3c588d5..a86cc8e76a 100644
--- a/tests/auto/corelib/io/qresourceengine/CMakeLists.txt
+++ b/tests/auto/corelib/io/qresourceengine/CMakeLists.txt
@@ -1,11 +1,14 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## tst_qresourceengine Test:
#####################################################################
-if (NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_qresourceengine LANGUAGES C CXX ASM)
- find_package(Qt6BuildInternals COMPONENTS STANDALONE_TEST)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
# Collect test data
@@ -28,6 +31,17 @@ qt_internal_add_test(tst_qresourceengine
TESTDATA ${test_data}
)
+set_source_files_properties("world.txt"
+ PROPERTIES QT_DISCARD_FILE_CONTENTS TRUE
+)
+
+qt_internal_add_resource(tst_qresourceengine "qt_resource_empty"
+ PREFIX
+ "/empty"
+ FILES
+ "world.txt"
+)
+
qt_add_resources(additional_sources testqrc/test.qrc)
target_sources(tst_qresourceengine PRIVATE ${additional_sources})