From 908ee750edea5ed9715536d38991599f82607053 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 25 Nov 2020 17:54:53 +0100 Subject: CMake: Fix resource object file paths in prl files for prefix builds Before this change, the prl files always assumed that resource object files are installed into $qt_prefix/lib when doing a prefix build. That was true for qt_internal_add_resource calls, but not for qt6_add_qml_module and qt6_target_qml_files. Change qt_internal_record_rcc_object_files to take a new required INSTALL_LOCATION argument. The argument takes a path relative to CMAKE_INSTALL_PREFIX. Modify __qt_propagate_generated_resource to save the relative path of the generated resource source file, which will be used in the computation of the final resource object file location. This is needed because the Qml resource functions place the source files in a different directory layout, e.g. .rcc vs .qmlcache Modify qt_generate_prl_file to prepend $$[QT_INSTALL_PREFIX]/ instead of $$[QT_INSTALL_LIBS]/ for the resource install paths. A follow up patch is done in qtdeclarative to pass the new INSTALL_LOCATION argument from the Qml CMake functions. Amends f9dcade5e795a631b9a2d93c855aa8198d58e24e Task-number: QTBUG-87702 Task-number: QTBUG-88425 Change-Id: Id17bb517b4cb5d00911bfd10a728ba4e0d44871b Reviewed-by: Qt CI Bot Reviewed-by: Joerg Bornemann (cherry picked from commit 54d0ca93bca78f8fd31b6761f078e7a96283f183) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtPrlHelpers.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake/QtPrlHelpers.cmake') diff --git a/cmake/QtPrlHelpers.cmake b/cmake/QtPrlHelpers.cmake index 709dfb6edf..566d311e74 100644 --- a/cmake/QtPrlHelpers.cmake +++ b/cmake/QtPrlHelpers.cmake @@ -283,7 +283,7 @@ function(qt_generate_prl_file target install_dir) endif() if(rcc_objects AND QT_WILL_INSTALL) - list(TRANSFORM rcc_objects PREPEND "$$[QT_INSTALL_LIBS]/") + list(TRANSFORM rcc_objects PREPEND "$$[QT_INSTALL_PREFIX]/") endif() # Generate a preliminary .prl file that contains absolute paths to all libraries -- cgit v1.2.3