CMake: Place framework .prl files under Resources

Adapts to qmake's 74abe983204dab35dcce59001308c54d34ad2c02 change

Change-Id: If1d6ce063d53dda4835a224661a16219cf9a9476
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Alexandru Croitor 2020-06-24 18:43:05 +02:00
parent 177c0ef204
commit 3cd614644a

View File

@ -3039,6 +3039,14 @@ function(qt_generate_prl_file target install_dir)
else()
set(prefix_for_prl_name "$<TARGET_FILE_PREFIX:${target}>")
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}$<TARGET_FILE_BASE_NAME:${target}>.prl")
file(GENERATE
OUTPUT "${prl_file_name}"