CMake support added for building with MinGW (#275)

This commit is contained in:
Chuck Walbourn
2022-05-05 14:50:13 -07:00
committed by GitHub
parent 24c1415c9a
commit 9c72f2c6cd
26 changed files with 229 additions and 151 deletions

View File

@@ -17,20 +17,31 @@
#pragma once
#ifdef WIN32
#include <d3d12.h>
#ifdef __MINGW32__
#include <unknwn.h>
#endif
#ifdef NTDDI_WIN10_FE
#ifndef _WIN32
#include <wsl/winadapter.h>
#include <wsl/wrladapter.h>
#endif
#if !defined(_WIN32) || defined(USING_DIRECTX_HEADERS)
#include <directx/d3d12.h>
#include <dxguids/dxguids.h>
#else
#include <d3d12.h>
#pragma comment(lib,"dxguid.lib")
#endif
#ifdef _WIN32
#if defined(NTDDI_WIN10_FE) || defined(__MINGW32__)
#include <ocidl.h>
#else
#include <OCIdl.h>
#endif
#include <functional>
#else
#include <wsl/winadapter.h>
#include <wsl/wrladapter.h>
#include <directx/d3d12.h>
#endif
@@ -43,7 +54,7 @@ namespace DirectX
D3D12_RESOURCE_STATES beforeState = D3D12_RESOURCE_STATE_RENDER_TARGET,
D3D12_RESOURCE_STATES afterState = D3D12_RESOURCE_STATE_RENDER_TARGET) noexcept;
#ifdef WIN32
#ifdef _WIN32
HRESULT __cdecl SaveWICTextureToFile(
_In_ ID3D12CommandQueue* pCommandQ,
_In_ ID3D12Resource* pSource,