From 142777a608d1169ad06c8c448655557db317afd7 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 20 May 2021 18:15:49 +0200 Subject: Support multiple equally named .qrc files in qt_add_big_resources It is now possible to call qt_add_big_resources with multiple .qrc files that are in different directories but have the same file name. Before, this resulted in target name conflict errors. Fixes: QTBUG-93230 Change-Id: Ic3d9d6974a107163aeb7ada0b6f1fa113fb18de0 Reviewed-by: Alexandru Croitor (cherry picked from commit 895edcd7cdcf47ec9238d42db742f81c5c2eaeb9) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/cmake/test_add_big_resource/CMakeLists.txt | 3 ++- .../auto/cmake/test_add_big_resource/subdir/subdir_resource_file.txt | 1 + .../cmake/test_add_big_resource/subdir/test_add_big_resource.qrc | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 tests/auto/cmake/test_add_big_resource/subdir/subdir_resource_file.txt create mode 100644 tests/auto/cmake/test_add_big_resource/subdir/test_add_big_resource.qrc (limited to 'tests') diff --git a/tests/auto/cmake/test_add_big_resource/CMakeLists.txt b/tests/auto/cmake/test_add_big_resource/CMakeLists.txt index 49abde6650..59e5705925 100644 --- a/tests/auto/cmake/test_add_big_resource/CMakeLists.txt +++ b/tests/auto/cmake/test_add_big_resource/CMakeLists.txt @@ -9,7 +9,8 @@ find_package(Qt6Core REQUIRED) qt_wrap_cpp(moc_files myobject.h) -qt_add_big_resources(rcc_files "test_add_big_resource.qrc" "test_add_big_resource2.qrc") +qt_add_big_resources(rcc_files "test_add_big_resource.qrc" "test_add_big_resource2.qrc" + "subdir/test_add_big_resource.qrc") add_executable(myobject myobject.cpp ${moc_files} ${rcc_files}) target_link_libraries(myobject PRIVATE Qt::Core) diff --git a/tests/auto/cmake/test_add_big_resource/subdir/subdir_resource_file.txt b/tests/auto/cmake/test_add_big_resource/subdir/subdir_resource_file.txt new file mode 100644 index 0000000000..2c604a4f18 --- /dev/null +++ b/tests/auto/cmake/test_add_big_resource/subdir/subdir_resource_file.txt @@ -0,0 +1 @@ +Ken sent me. diff --git a/tests/auto/cmake/test_add_big_resource/subdir/test_add_big_resource.qrc b/tests/auto/cmake/test_add_big_resource/subdir/test_add_big_resource.qrc new file mode 100644 index 0000000000..9bf4f19823 --- /dev/null +++ b/tests/auto/cmake/test_add_big_resource/subdir/test_add_big_resource.qrc @@ -0,0 +1,5 @@ + + + subdir_resource_file.txt + + -- cgit v1.2.3