From 4757bab0a91bd047053a907f88ab4a68fac29b7a Mon Sep 17 00:00:00 2001 From: Li Xinwei <1326710505@qq.com> Date: Sun, 30 Jun 2024 13:06:46 +0800 Subject: [PATCH] CMake: add missing dependencies to QMake_LIBS_ in pri files WrapBrotli::WrapBrotliDec depends on WrapBrotli::WrapBrotliCommon. OpenSSL::Crypto depends on ws2_32 and crypt32 on Windows. These dependencies are currently missing in generated pri files, because WrapBrotli::WrapBrotliDec and WrapBrotli::WrapBrotliDec are UNKNOWN_LIBRARY. Currently only INTERFACE_LIBRARY's INTERFACE_LINK_LIBRARIES are processed when generating pri files. Pick-to: 6.7 Change-Id: I45a7ecbbb843adbe3aea7fdc68cec6c794015552 Reviewed-by: Alexey Edelev (cherry picked from commit 4dce218ac400afcb54aa2a85a0b27947fec583cb) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtPriHelpers.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/QtPriHelpers.cmake b/cmake/QtPriHelpers.cmake index 5deeba343de..c3b13c7af4c 100644 --- a/cmake/QtPriHelpers.cmake +++ b/cmake/QtPriHelpers.cmake @@ -35,12 +35,13 @@ function(qt_generate_qmake_libraries_pri_content module_name output_root_dir out endif() list(APPEND seen_targets ${lib_target}) get_target_property(lib_target_type ${lib_target} TYPE) - if(lib_target_type STREQUAL "INTERFACE_LIBRARY") + if(lib_target_type MATCHES "^(INTERFACE|UNKNOWN)_LIBRARY") get_target_property(iface_libs ${lib_target} INTERFACE_LINK_LIBRARIES) if(iface_libs) list(PREPEND lib_targets ${iface_libs}) endif() - else() + endif() + if(NOT lib_target_type STREQUAL "INTERFACE_LIBRARY") list(APPEND lib_libs "$") endif() list(APPEND lib_libdir "$")