summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2022-08-17 17:32:08 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-09-12 19:06:49 +0000
commit9327dcb9b83a894b945d883a1acf4f26edacb15c (patch)
tree5a96496f18864fcbe301d36b21d4f24145ff77b9
parentb6e3d353593f39158411ad8e66aa6de19483c99f (diff)
Use delay load for media foundation
We should delay some dll loads as MediaFoundation is not available on Windows N. Chromium already uses that option when compiling components, however we use only response file to track dependencies, and those libs were never linked with DELAYLAD flags by (qt)cmake. There is currently no nice way to set those base on gn dependencies as those are generated on bulid time and we need linker flags on configure time. As workaround simply hardcode those 3 required libs, as side effect when linking QtPdf module there will be warning that there are no references to mentioned media foundation libs. Fixes: QTBUG-100391 Change-Id: I06e4bffdf8bc6803a4f2b1437679628b9a733299 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io> (cherry picked from commit 74163a6511278fa8273ca931ffdf9b9b3a8daae6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--cmake/Functions.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake
index 435e66ba9..557d30cb2 100644
--- a/cmake/Functions.cmake
+++ b/cmake/Functions.cmake
@@ -454,6 +454,7 @@ function(add_linker_options target buildDir completeStatic)
endif()
if(WIN32)
get_copy_of_response_file(objects_rsp ${target} objects)
+ target_link_options(${cmakeTarget} PRIVATE /DELAYLOAD:mf.dll /DELAYLOAD:mfplat.dll /DELAYLOAD:mfreadwrite.dll)
target_link_options(${cmakeTarget} PRIVATE "$<$<CONFIG:${config}>:@${objects_rsp}>")
if(NOT completeStatic)
get_copy_of_response_file(archives_rsp ${target} archives)