From 7e2c198e90abe66f31c09343b7b71d8dbbdc3a12 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Tue, 4 Feb 2020 16:50:30 +0100 Subject: [PATCH] Remove retained quick compiler resource files Remove retained file feature as the expected behavior now is for the compiled file to be retained by default. Change-Id: I5a791a182825b223eb4497970fbb1c47c70135cc Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor --- cmake/QtResource.cmake.in | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/cmake/QtResource.cmake.in b/cmake/QtResource.cmake.in index 84a275bc67..bef47707ea 100644 --- a/cmake/QtResource.cmake.in +++ b/cmake/QtResource.cmake.in @@ -40,13 +40,11 @@ function(__qt_quick_compiler_process_resources target resource_name) set(qml_files) set(resource_files) - set(retained_files) # scan for qml files foreach(file IN LISTS arg_FILES) # check whether this resource should not be processed by the qt quick # compiler get_source_file_property(skip_compiler_check ${file} QT_SKIP_QUICKCOMPILER) - get_source_file_property(retain_compiler_check ${file} QT_RETAIN_QUICKCOMPILER) if (skip_compiler_check) list(APPEND resource_files ${file}) continue() @@ -56,19 +54,13 @@ function(__qt_quick_compiler_process_resources target resource_name) OR ${file} MATCHES "\.mjs$" OR ${file} MATCHES "\.qml$") list(APPEND qml_files ${file}) - if (retain_compiler_check) - list(APPEND retained_files ${file}) - list(APPEND resource_files ${file}) - endif() - else() - list(APPEND resource_files ${file}) endif() + list(APPEND resource_files ${file}) endforeach() if (NOT TARGET @QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen AND qml_files) message(WARNING "QT@PROJECT_VERSION_MAJOR@_PROCESS_RESOURCE: Qml files were detected but the qmlcachgen target is not defined. Consider adding QmlTools to your find_package command.") endif() - set(retained_resource_paths) if (TARGET @QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen AND qml_files) # Enable qt quick compiler support set(qml_resource_file "${CMAKE_CURRENT_BINARY_DIR}/.rcc/${resource_name}.qrc") @@ -86,9 +78,6 @@ function(__qt_quick_compiler_process_resources target resource_name) else() set(file_resource_path "${arg_PREFIX}/${file_resource_path}") endif() - if (file IN_LIST retained_files) - list(APPEND retained_resource_paths ${file_resource_path}) - endif() file(TO_CMAKE_PATH ${file_resource_path} file_resource_path) list(APPEND file_resource_paths ${file_resource_path}) string(REGEX REPLACE "\.js$" "_js" compiled_file ${file_relative}) @@ -127,21 +116,11 @@ function(__qt_quick_compiler_process_resources target resource_name) set(resource_name_arg "${resource_name_arg}=${chained_resource_name}") endif() - if (retained_resource_paths) - set(retained_loader_list "${CMAKE_CURRENT_BINARY_DIR}/.rcc/qmlcache/${resource_name}/retained_file_list.rsp") - file(GENERATE - OUTPUT ${retained_loader_list} - CONTENT "$" - ) - set(retained_args "--retain" "@${retained_loader_list}") - endif() - add_custom_command( OUTPUT ${qmlcache_loader_file} ${QT_TOOL_PATH_SETUP_COMMAND} COMMAND @QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen - ${retained_args} --resource-name "${resource_name_arg}" -o "${qmlcache_loader_file}" "@${qmlcache_loader_list}"