Skip to content

GetPrerequisites.cmake : Exclude delay load dependencies under windows

This commit tries to solve the issue : #16241 (closed)

See comment made by l0calh05t in this thread: "I just had a look into GetPrerequisites.cmake, and on windows either dumpbin (MSVC) or objdump (MinGW) are used. Interesting fact: objdump doesn't even list the delay loaded dependencies, so to get consistent behavior between the two they should always be ignored."

l0calh05t was worried that the message "Image has the following delay load dependencies" might be localized on different Windows languages. Based on my experiences ("Windows 7 french" and "Windows Server 2008 R2" hosts), it is not translated (at least in french).

Below is an example output (AUHOR_WARNING) with Qt5WebEngineCore.dll:

CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.7/Modules/GetPrerequisites.cmake:821 (message):
  GetPrequisites(C:/Qt/Qt5.7.0/5.7/msvc2015/bin/Qt5WebEngineCore.dll) :
  ignoring the following delay load dependencies :

   Image has the following delay load dependencies:
      SHELL32.dll
      USER32.dll
      dwmapi.dll
      d3d9.dll
      d3d11.dll
      dxva2.dll
      MF.dll
      MFPlat.DLL
      bthprops.cpl
      BluetoothApis.dll
      dbghelp.dll
      CFGMGR32.dll
      POWRPROF.dll
      SETUPAPI.dll
      MFReadWrite.dll

    Summary
        143000 .data
          1000 .gfids
        639000 .rdata
        160000 .reloc
          2000 .rodata
          1000 .rsrc
       2459000 .text
          1000 .tls
          2000 _RDATA

Merge request reports