diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 4c70202d32b..f8bc709637b 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -3039,6 +3039,14 @@ function(qt_generate_prl_file target install_dir) else() set(prefix_for_prl_name "$") endif() + + # For frameworks, the prl file should be placed under the Resources subdir. + get_target_property(is_framework ${target} FRAMEWORK) + if(is_framework) + get_target_property(fw_version ${target} FRAMEWORK_VERSION) + string(APPEND prefix_for_prl_name "Versions/${fw_version}/Resources/") + endif() + set(prl_file_name "${prefix_for_prl_name}$.prl") file(GENERATE OUTPUT "${prl_file_name}"