From f590a35bf74cba94bab3bcc886f959babe4b6585 Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Sun, 16 Jun 2024 01:00:54 -0400 Subject: [PATCH] cmake: Fix some Qt DLLs not being copied due to filename patterns Qt has some Release DLLs that end with the letter d: * qdirect2d.dll * qcertonlybackend.dll * qopensslbackend.dll * qschannelbackend.dll As a result, they get caught by our simple check for if a DLL is a Debug DLL which just checks if the DLL ends with the letter d. Extend that check to exclude these specific DLLs from being marked as Debug DLLs. --- cmake/windows/helpers.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/windows/helpers.cmake b/cmake/windows/helpers.cmake index 7fa55f5eb..b4d0bf4dd 100644 --- a/cmake/windows/helpers.cmake +++ b/cmake/windows/helpers.cmake @@ -481,6 +481,7 @@ function(_bundle_dependencies target) COMPONENT Runtime ) + set(debug_dll_exceptions qdirect2d qcertonlybackend qopensslbackend qschannelbackend) list(REMOVE_DUPLICATES plugins_list) foreach(plugin IN LISTS plugins_list) message(TRACE "Adding Qt plugin ${plugin}...") @@ -490,12 +491,13 @@ function(_bundle_dependencies target) list(APPEND plugin_stems ${plugin_stem}) - if(plugin MATCHES ".+d\\.dll$") + if(plugin MATCHES "(.+d)\\.dll$" AND CMAKE_MATCH_COUNT EQUAL 1 AND NOT CMAKE_MATCH_1 IN_LIST debug_dll_exceptions) list(APPEND plugin_${plugin_stem}_debug ${plugin}) else() list(APPEND plugin_${plugin_stem} ${plugin}) endif() endforeach() + unset(debug_exceptions) list(REMOVE_DUPLICATES plugin_stems) foreach(stem IN LISTS plugin_stems)