diff options
author | Michal Klocek <michal.klocek@qt.io> | 2022-08-17 17:32:08 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2022-09-12 07:44:22 +0000 |
commit | 74163a6511278fa8273ca931ffdf9b9b3a8daae6 (patch) | |
tree | d53e62b52c2f12de26b82a4bbe44a33f9b949294 | |
parent | b30559565cb91501baddea495362101341a0aa22 (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.
Pick-to: 6.4 6.4.0 6.3
Fixes: QTBUG-100391
Change-Id: I06e4bffdf8bc6803a4f2b1437679628b9a733299
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
-rw-r--r-- | cmake/Functions.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake index cbae168c5..8e06ff34c 100644 --- a/cmake/Functions.cmake +++ b/cmake/Functions.cmake @@ -459,6 +459,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) |