define NO_WINSDKVER_H for windows SDL2 builds

SDL_config_windows.h from development version of SDL added inclusion of
winsdkver.h which may not be available in old SDKs.  we have no use for
the functionality provided by it, therefore disable it.
This commit is contained in:
Ozkan Sezer 2021-11-05 10:51:10 +03:00
parent 3fbb11b048
commit 2492689d9e
5 changed files with 11 additions and 5 deletions

View file

@ -68,6 +68,8 @@ endif
ifeq ($(USE_SDL2),1)
CFLAGS += -DUSE_SDL2
# for compatibility with old sdks
CFLAGS += -DNO_WINSDKVER_H
endif
# default to our local SDL[2] for build

View file

@ -66,6 +66,8 @@ endif
ifeq ($(USE_SDL2),1)
CFLAGS += -DUSE_SDL2
# for compatibility with old sdks
CFLAGS += -DNO_WINSDKVER_H
endif
# default to our local SDL[2] for build

View file

@ -38,6 +38,7 @@ SDL_LIBS = ../Windows/SDL/watcom/SDL.lib
SDL_CFLAGS = -I../Windows/SDL2/include
SDL_LIBS = ../Windows/SDL2/watcom/SDL2.lib
CFLAGS += -DUSE_SDL2
CFLAGS += -DNO_WINSDKVER_H
!endif
!ifeq WINSOCK2 1
@ -128,7 +129,7 @@ all: quakespasm.exe
SDL_win32_main.obj: ../Windows/SDL/main/SDL_win32_main.c
wcc386 $(CFLAGS_BASE) $(SDL_CFLAGS) -fo=$^@ $<
SDL_windows_main.obj: ../Windows/SDL2/main/SDL_windows_main.c
wcc386 $(CFLAGS_BASE) $(SDL_CFLAGS) -I../Windows/SDL2/main -fo=$^@ $<
wcc386 $(CFLAGS_BASE) $(SDL_CFLAGS) -DNO_WINSDKVER_H -I../Windows/SDL2/main -fo=$^@ $<
quakespasm.res: ../Windows/QuakeSpasm.rc
wrc -q -r -bt=nt -I../Windows -fo=$^@ $<

View file

@ -33,6 +33,7 @@
<Compiler>
<Add option="-Wall" />
<Add option="-DUSE_SDL2" />
<Add option="-DNO_WINSDKVER_H" />
<Add option="-DUSE_CODEC_MP3" />
<Add option="-DUSE_CODEC_VORBIS" />
<Add option="-DUSE_CODEC_WAVE" />

View file

@ -41,7 +41,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\SDL2\include;..\codecs\include;..\misc\include;..\..\Quake"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SDL2;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS;USE_CODEC_MIKMOD;USE_CODEC_UMX"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SDL2;NO_WINSDKVER_H;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS;USE_CODEC_MIKMOD;USE_CODEC_UMX"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@ -117,7 +117,7 @@
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\SDL2\include;..\codecs\include;..\misc\include;..\..\Quake"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SDL2;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS;USE_CODEC_MIKMOD;USE_CODEC_UMX"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SDL2;NO_WINSDKVER_H;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS;USE_CODEC_MIKMOD;USE_CODEC_UMX"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
@ -192,7 +192,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\SDL2\include;..\codecs\include;..\misc\include;..\..\Quake"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USE_WINSOCK2;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SDL2;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS;USE_CODEC_MIKMOD;USE_CODEC_UMX"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USE_WINSOCK2;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SDL2;NO_WINSDKVER_H;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS;USE_CODEC_MIKMOD;USE_CODEC_UMX"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@ -269,7 +269,7 @@
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\SDL2\include;..\codecs\include;..\misc\include;..\..\Quake"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USE_WINSOCK2;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SDL2;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS;USE_CODEC_MIKMOD;USE_CODEC_UMX"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USE_WINSOCK2;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SDL2;NO_WINSDKVER_H;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS;USE_CODEC_MIKMOD;USE_CODEC_UMX"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"