Skip to content

Commit af4d3ce

Browse files
committed
Update for MinGW
1 parent 4ba974f commit af4d3ce

File tree

5 files changed

+31
-3
lines changed

5 files changed

+31
-3
lines changed

CMakePresets.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,20 @@
147147
"strategy": "external"
148148
}
149149
},
150+
{
151+
"name": "MinGW32",
152+
"hidden": true,
153+
"environment": {
154+
"PATH": "$penv{PATH};c:/mingw32/bin;c:/mingw32/libexec/gcc/i686-w64-mingw32/12.2.0"
155+
}
156+
},
157+
{
158+
"name": "MinGW64",
159+
"hidden": true,
160+
"environment": {
161+
"PATH": "$penv{PATH};c:/mingw64/bin;c:/mingw64/libexec/gcc/x86_64-w64-mingw32/12.2.0"
162+
}
163+
},
150164
{
151165
"name": "Intel",
152166
"hidden": true,
@@ -186,7 +200,15 @@
186200
{ "name": "x86-Debug-Clang" , "description": "Clang/LLVM for x86 (Debug) - SSE/SSE2", "inherits": [ "base", "x86", "Debug", "Clang", "Clang-X86" ] },
187201
{ "name": "x86-Release-Clang" , "description": "Clang/LLVM for x86 (Release) - SSE/SSE2", "inherits": [ "base", "x86", "Release", "Clang", "Clang-X86" ] },
188202
{ "name": "arm64-Debug-Clang" , "description": "Clang/LLVM for AArch64 (Debug) - ARM-NEON", "inherits": [ "base", "ARM64", "Debug", "Clang", "Clang-AArch64" ] },
189-
{ "name": "arm64-Release-Clang", "description": "Clang/LLVM for AArch64 (Release) - ARM-NEON", "inherits": [ "base", "ARM64", "Release", "Clang", "Clang-AArch64" ] }
203+
{ "name": "arm64-Release-Clang", "description": "Clang/LLVM for AArch64 (Release) - ARM-NEON", "inherits": [ "base", "ARM64", "Release", "Clang", "Clang-AArch64" ] },
204+
205+
{ "name": "x64-Debug-MinGW" , "description": "MinG-W64 (Debug) - SSE/SSE2", "inherits": [ "base", "x64", "Debug", "GNUC", "MinGW64" ] },
206+
{ "name": "x64-Release-MinGW" , "description": "MinG-W64 (Release) - SSE/SSE2", "inherits": [ "base", "x64", "Release", "GNUC", "MinGW64" ] },
207+
{ "name": "x86-Debug-MinGW" , "description": "MinG-W32 (Debug) - SSE/SSE2", "inherits": [ "base", "x86", "Debug", "GNUC", "MinGW32" ] },
208+
{ "name": "x86-Release-MinGW" , "description": "MinG-W32 (Release) - SSE/SSE2", "inherits": [ "base", "x86", "Release", "GNUC", "MinGW32" ] },
209+
210+
{ "name": "x64-Debug-Linux" , "description": "WSL x64 (Debug) - SSE/SSE2", "inherits": [ "base", "x64", "Debug" ] },
211+
{ "name": "x64-Release-Linux" , "description": "WSL x64 (Release) - SSE/SSE2", "inherits": [ "base", "x64", "Release" ] }
190212
],
191213
"testPresets": [
192214
{ "name": "x64-Debug" , "configurePreset": "x64-Debug" },

SHMath/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ target_include_directories(${PROJECT_NAME} PUBLIC
7171

7272
target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_11)
7373

74+
target_link_libraries(${PROJECT_NAME} PRIVATE DirectXMath)
75+
7476
if(MINGW)
7577
find_package(directx-headers CONFIG REQUIRED)
7678
target_link_libraries(${PROJECT_NAME} PUBLIC Microsoft::DirectX-Headers)

SHMath/DirectXSH.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#define DIRECTX_SHMATH_VERSION 106
1313

14-
#include <DirectXMath.h>
14+
#include "DirectXMath.h"
1515

1616
namespace DirectX
1717
{

SHMath/DirectXSHD3D12.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
// C5039 pointer or reference to potentially throwing function passed to extern C function under - EHc
1717
#endif
1818

19+
#ifdef __MINGW32__
20+
#include <unknwn.h>
21+
#endif
22+
1923
#ifdef USING_DIRECTX_HEADERS
2024
#include <directx/d3d12.h>
2125
#else

XDSP/XDSP.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#pragma once
1818

1919
#include <cassert>
20-
#include <DirectXMath.h>
20+
#include "DirectXMath.h"
2121

2222
#include <cstdint>
2323
#include <cstring>

0 commit comments

Comments
 (0)