diff options
| author | Joerg Bornemann <[email protected]> | 2025-09-09 13:40:02 +0200 |
|---|---|---|
| committer | Joerg Bornemann <[email protected]> | 2025-09-11 21:24:48 +0200 |
| commit | a975781f5c86981048b0767ae9bbe5d1e59e7160 (patch) | |
| tree | ac11662b7b2476e55a6700baf94dd53b72c5ac18 /cmake/QtPostProcessHelpers.cmake | |
| parent | 08a17345db77589fc5a1c451df2795071b5bd3e9 (diff) | |
CMake: Simplify the installation of .prl files
Since the commit that introduced .prl file generation,
bfcf36d459c7a36a92dd6f9127e6513f7a08277e, we jumped through some hoops
to collect the build directories containing .prl files and then
installing these directories with the FILES_MATCHING argument. This
resulted in the installation of empty directories, because
install(DIRECTORY ... FILES_MATCHING ...) preserves the input directory
structure.
This complex installation procedure is unnecessary. We know how to
construct the final .prl file path with generator expressions.
install(FILES) supports generator expressions since CMake 3.0, which the
original author of bfcf36d459c7a36a92dd6f9127e6513f7a08277e missed.
Remove the qt_internal_install_prl_files function that called
install(DIRECTORY ... FILES_MATCHING ...) in a post-process step, and
call install(FILES ...) instead for every generated .prl file. This
solves the issue that we would install empty directories in lib/cmake.
Pick-to: 6.10
Task-number: QTBUG-138580
Change-Id: I4af3e808dc420d08a0e1a1fe3059a0a432949586
Reviewed-by: Alexandru Croitor <[email protected]>
Diffstat (limited to 'cmake/QtPostProcessHelpers.cmake')
| -rw-r--r-- | cmake/QtPostProcessHelpers.cmake | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake index 68502ad23a7..12f5c617960 100644 --- a/cmake/QtPostProcessHelpers.cmake +++ b/cmake/QtPostProcessHelpers.cmake @@ -863,22 +863,6 @@ function(qt_internal_create_config_file_for_standalone_tests) ) endfunction() -function(qt_internal_install_prl_files) - # Get locations relative to QT_BUILD_DIR from which prl files should be installed. - get_property(prl_install_dirs GLOBAL PROPERTY QT_PRL_INSTALL_DIRS) - - # Clear the list of install dirs so the previous values don't pollute the list of install dirs - # for the next repository in a top-level build. - set_property(GLOBAL PROPERTY QT_PRL_INSTALL_DIRS "") - - foreach(prl_install_dir ${prl_install_dirs}) - qt_install(DIRECTORY "${QT_BUILD_DIR}/${prl_install_dir}/" - DESTINATION ${prl_install_dir} - FILES_MATCHING PATTERN "*.prl" - ) - endforeach() -endfunction() - function(qt_internal_generate_user_facing_tools_info) if("${INSTALL_PUBLICBINDIR}" STREQUAL "") return() |
