introduce VULKAN_NO_STRING_HELPER env variable for make, in case the user doesn't have vk_enum_string_helper.h (or it doesn't work idk)
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@125 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
bd144b1ca3
commit
327f13dc98
2 changed files with 10 additions and 5 deletions
10
GNUmakefile
10
GNUmakefile
|
|
@ -16,6 +16,12 @@ ifeq ($(DEBUG),1)
|
|||
CFLAGS += -g
|
||||
endif
|
||||
|
||||
ifeq ($(VULKAN_NO_STRING_HELPER),1)
|
||||
VK_STRING_HELPER_DEFINE =
|
||||
else
|
||||
VK_STRING_HELPER_DEFINE = -DHAS_VK_ENUM_STRING_HELPER
|
||||
endif
|
||||
|
||||
L_CFLAGS = $(CFLAGS) -fPIC -D_MILSKO
|
||||
L_LDFLAGS = $(LDFLAGS)
|
||||
L_LIBS = $(LIBS)
|
||||
|
|
@ -44,7 +50,7 @@ $(error Add your platform definition)
|
|||
endif
|
||||
|
||||
ifeq ($(UNIX),1)
|
||||
L_CFLAGS += -DUSE_X11
|
||||
L_CFLAGS += -DUSE_X11 $(VK_STRING_HELPER_DEFINE)
|
||||
L_OBJS += src/backend/x11.o
|
||||
L_LIBS += -lX11 -lXrender -lXext
|
||||
|
||||
|
|
@ -57,7 +63,7 @@ EXEC =
|
|||
|
||||
OPENGL = 1
|
||||
else ifeq ($(WINDOWS),1)
|
||||
L_CFLAGS += -DUSE_GDI
|
||||
L_CFLAGS += -DUSE_GDI $(VK_STRING_HELPER_DEFINE)
|
||||
L_LDFLAGS += -Wl,--out-implib,src/libMw.lib -static-libgcc
|
||||
L_OBJS += src/backend/gdi.o
|
||||
L_LIBS += -lgdi32
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@
|
|||
#include <vulkan/vulkan_win32.h>
|
||||
#endif
|
||||
|
||||
// MinGW's copy of vulkan string helpers is just straight up busted.
|
||||
#ifndef __MINGW32__
|
||||
#ifndef HAS_VK_ENUM_STRING_HELPER
|
||||
#include <vulkan/vk_enum_string_helper.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -60,7 +59,7 @@ MwVulkanConfig vulkan_config = {
|
|||
#endif
|
||||
|
||||
// convienence macro for handling vulkan errors
|
||||
#ifndef __MINGW32__
|
||||
#ifndef HAS_VK_ENUM_STRING_HELPER
|
||||
#define VK_CMD(func) \
|
||||
vk_res = func; \
|
||||
if(vk_res != VK_SUCCESS) { \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue