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.
This commit is contained in:
Ryan Foster 2024-06-16 01:00:54 -04:00
commit f590a35bf7

View file

@ -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)