summaryrefslogtreecommitdiff
path: root/platform/windows
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-10-25 22:20:54 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-10-26 08:55:05 +0300
commit4dd8f68120bc3d3be94e0556ccfef9ee4bf8311a (patch)
tree8d0dd1b58dedbdae7a84d1f36317e411ebabcdf2 /platform/windows
parent2b505b74b9b0a7005586ecaa9aa1236e86b18437 (diff)
Fix build with Vulkan disabled and no Vulkan headers installed.
Diffstat (limited to 'platform/windows')
-rw-r--r--platform/windows/detect.py12
-rw-r--r--platform/windows/vulkan_context_win.h4
2 files changed, 11 insertions, 5 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 74868fc6a2..705e83dace 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -582,12 +582,14 @@ def configure_mingw(env):
]
)
- env.Append(CPPDEFINES=["VULKAN_ENABLED"])
- if not env["use_volk"]:
- env.Append(LIBS=["vulkan"])
+ if env["vulkan"]:
+ env.Append(CPPDEFINES=["VULKAN_ENABLED"])
+ if not env["use_volk"]:
+ env.Append(LIBS=["vulkan"])
- env.Append(CPPDEFINES=["GLES3_ENABLED"])
- env.Append(LIBS=["opengl32"])
+ if env["opengl3"]:
+ env.Append(CPPDEFINES=["GLES3_ENABLED"])
+ env.Append(LIBS=["opengl32"])
env.Append(CPPDEFINES=["MINGW_ENABLED", ("MINGW_HAS_SECURE_API", 1)])
diff --git a/platform/windows/vulkan_context_win.h b/platform/windows/vulkan_context_win.h
index 2ecdfc8f3f..9dedcabb2b 100644
--- a/platform/windows/vulkan_context_win.h
+++ b/platform/windows/vulkan_context_win.h
@@ -31,6 +31,8 @@
#ifndef VULKAN_CONTEXT_WIN_H
#define VULKAN_CONTEXT_WIN_H
+#ifdef VULKAN_ENABLED
+
#include "drivers/vulkan/vulkan_context.h"
#define WIN32_LEAN_AND_MEAN
@@ -46,4 +48,6 @@ public:
~VulkanContextWindows();
};
+#endif // VULKAN_ENABLED
+
#endif // VULKAN_CONTEXT_WIN_H