From fdf5d11ff6f3f5034d7d7f7664f4cc76deb26ef5 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Wed, 9 Feb 2022 16:24:24 +0100 Subject: CMake: Add BUILTIN_TESTDATA option to qt_internal_add_test Multiple tests use qt_internal_add_resource that copies the functionality that is already implemented inside the qt_internal_add_test function. Simplify these test by replacing the qt_internal_add_resource call with the new BUILTIN_TESTDATA option. Change-Id: I18475b817d6f87264f0de53817d6c26c5ccab4e2 Reviewed-by: Alexandru Croitor --- .../auto/gui/kernel/qguivariant/test/CMakeLists.txt | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'tests/auto/gui/kernel/qguivariant/test') diff --git a/tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt b/tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt index a3292511bd..49e985fa82 100644 --- a/tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt +++ b/tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt @@ -4,6 +4,12 @@ ## tst_qguivariant Test: ##################################################################### +# Resources: +file(GLOB_RECURSE qguivariant_resource_files + RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" + "data/*" +) + qt_internal_add_test(tst_qguivariant SOURCES tst_qguivariant.cpp @@ -11,17 +17,6 @@ qt_internal_add_test(tst_qguivariant ../../../../other/qvariant_common PUBLIC_LIBRARIES Qt::Gui + TESTDATA ${qguivariant_resource_files} + BUILTIN_TESTDATA ) - -# Resources: -set(qguivariant_resource_files - "data" -) - -qt_internal_add_resource(tst_qguivariant "qguivariant" - PREFIX - "/" - FILES - ${qguivariant_resource_files} -) - -- cgit v1.2.3