Skip to content

Commit f590a35

Browse files
committed
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.
1 parent 11f2322 commit f590a35

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmake/windows/helpers.cmake

+3-1
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ function(_bundle_dependencies target)
481481
COMPONENT Runtime
482482
)
483483

484+
set(debug_dll_exceptions qdirect2d qcertonlybackend qopensslbackend qschannelbackend)
484485
list(REMOVE_DUPLICATES plugins_list)
485486
foreach(plugin IN LISTS plugins_list)
486487
message(TRACE "Adding Qt plugin ${plugin}...")
@@ -490,12 +491,13 @@ function(_bundle_dependencies target)
490491

491492
list(APPEND plugin_stems ${plugin_stem})
492493

493-
if(plugin MATCHES ".+d\\.dll$")
494+
if(plugin MATCHES "(.+d)\\.dll$" AND CMAKE_MATCH_COUNT EQUAL 1 AND NOT CMAKE_MATCH_1 IN_LIST debug_dll_exceptions)
494495
list(APPEND plugin_${plugin_stem}_debug ${plugin})
495496
else()
496497
list(APPEND plugin_${plugin_stem} ${plugin})
497498
endif()
498499
endforeach()
500+
unset(debug_exceptions)
499501

500502
list(REMOVE_DUPLICATES plugin_stems)
501503
foreach(stem IN LISTS plugin_stems)

0 commit comments

Comments
 (0)