From 61a4b0744d6ac110ca67c6bf806c756b028375ce Mon Sep 17 00:00:00 2001 From: Quantum Date: Wed, 11 Aug 2021 19:46:15 -0400 Subject: [PATCH] [host] dxgi: use standard MinGW libd3d11.a MinGW has been shipping this file since 2014, and that version contains the only function from the dll that we call: D3D11CreateDevice. --- .../Windows/capture/DXGI/CMakeLists.txt | 9 +--- .../Windows/capture/DXGI/dll/libd3d11.def | 44 ------------------- 2 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 host/platform/Windows/capture/DXGI/dll/libd3d11.def diff --git a/host/platform/Windows/capture/DXGI/CMakeLists.txt b/host/platform/Windows/capture/DXGI/CMakeLists.txt index 11786819..d71ae2f1 100644 --- a/host/platform/Windows/capture/DXGI/CMakeLists.txt +++ b/host/platform/Windows/capture/DXGI/CMakeLists.txt @@ -7,16 +7,9 @@ add_library(capture_DXGI STATIC add_definitions("-DCOBJMACROS -DINITGUID") -FIND_PROGRAM(DLLTOOL_EXECUTABLE NAMES "x86_64-w64-mingw32-dlltool" "dlltool" "dlltool.exe" DOC "dlltool executable") -ADD_CUSTOM_COMMAND(TARGET capture_DXGI POST_BUILD - WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/dll" - COMMAND ${DLLTOOL_EXECUTABLE} --def libd3d11.def --output-lib "${PROJECT_BINARY_DIR}/libd3d11.dll" - VERBATIM -) - target_link_libraries(capture_DXGI lg_common - ${PROJECT_BINARY_DIR}/libd3d11.dll + d3d11 dxgi ) diff --git a/host/platform/Windows/capture/DXGI/dll/libd3d11.def b/host/platform/Windows/capture/DXGI/dll/libd3d11.def deleted file mode 100644 index 2bb27ba2..00000000 --- a/host/platform/Windows/capture/DXGI/dll/libd3d11.def +++ /dev/null @@ -1,44 +0,0 @@ -LIBRARY "d3d11.dll" -EXPORTS -D3DKMTCloseAdapter -D3DKMTDestroyAllocation -D3DKMTDestroyContext -D3DKMTDestroyDevice -D3DKMTDestroySynchronizationObject -D3DKMTQueryAdapterInfo -D3DKMTSetDisplayPrivateDriverFormat -D3DKMTSignalSynchronizationObject -D3DKMTUnlock -D3DKMTWaitForSynchronizationObject -OpenAdapter10 -OpenAdapter10_2 -D3D11CoreCreateDevice -D3D11CoreCreateLayeredDevice -D3D11CoreGetLayeredDeviceSize -D3D11CoreRegisterLayers -D3D11CreateDevice -D3D11CreateDeviceAndSwapChain -D3DKMTCreateAllocation -D3DKMTCreateContext -D3DKMTCreateDevice -D3DKMTCreateSynchronizationObject -D3DKMTEscape -D3DKMTGetContextSchedulingPriority -D3DKMTGetDeviceState -D3DKMTGetDisplayModeList -D3DKMTGetMultisampleMethodList -D3DKMTGetRuntimeData -D3DKMTGetSharedPrimaryHandle -D3DKMTLock -D3DKMTOpenAdapterFromHdc -D3DKMTOpenResource -D3DKMTPresent -D3DKMTQueryAllocationResidency -D3DKMTQueryResourceInfo -D3DKMTRender -D3DKMTSetAllocationPriority -D3DKMTSetContextSchedulingPriority -D3DKMTSetDisplayMode -D3DKMTSetGammaRamp -D3DKMTSetVidPnSourceOwner -D3DKMTWaitForVerticalBlankEvent