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/util/qtexturefilereader/CMakeLists.txt | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'tests/auto/gui/util') diff --git a/tests/auto/gui/util/qtexturefilereader/CMakeLists.txt b/tests/auto/gui/util/qtexturefilereader/CMakeLists.txt index de809f577d..b7fc79854e 100644 --- a/tests/auto/gui/util/qtexturefilereader/CMakeLists.txt +++ b/tests/auto/gui/util/qtexturefilereader/CMakeLists.txt @@ -4,14 +4,6 @@ ## tst_qtexturefilereader Test: ##################################################################### -qt_internal_add_test(tst_qtexturefilereader - SOURCES - tst_qtexturefilereader.cpp - PUBLIC_LIBRARIES - Qt::Gui - Qt::GuiPrivate -) - # Resources: set(qtexturefilereader_resource_files "texturefiles/car.ktx" @@ -23,10 +15,13 @@ set(qtexturefilereader_resource_files "texturefiles/pattern.pkm" ) -qt_internal_add_resource(tst_qtexturefilereader "qtexturefilereader" - PREFIX - "/" - FILES - ${qtexturefilereader_resource_files} +qt_internal_add_test(tst_qtexturefilereader + SOURCES + tst_qtexturefilereader.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + TESTDATA ${qtexturefilereader_resource_files} + BUILTIN_TESTDATA ) -- cgit v1.2.3