Skip to content

Commit

Permalink
allow compiling renderer with --msvc in scons
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Feb 11, 2018
1 parent 0d1c3f5 commit 1237b49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions SConscript
Expand Up @@ -238,7 +238,7 @@ def findLibs(env, conf):
if not conf.CheckLib('mingw32') or not conf.CheckLib('ws2_32'):
FatalError("Error: some windows libraries not found or not installed, make sure your compiler is set up correctly")

if not conf.CheckLib('SDLmain'):
if not GetOption('renderer') and not conf.CheckLib('SDLmain'):
FatalError("libSDLmain not found or not installed")

if not GetOption('renderer'):
Expand Down Expand Up @@ -407,7 +407,11 @@ if platform == "Windows":
env.Append(CPPDEFINES=["WIN", "_WIN32_WINNT=0x0501", "_USING_V110_SDK71_"])
if msvc:
env.Append(CCFLAGS=['/Gm', '/Zi', '/EHsc', '/FS', '/GS']) #enable minimal rebuild, ?, enable exceptions, allow -j to work in debug builds, enable security check
env.Append(LINKFLAGS=['/SUBSYSTEM:WINDOWS,"5.01"', '/OPT:REF', '/OPT:ICF'])
if GetOption('renderer'):
env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE'])
else:
env.Append(LINKFLAGS=['/SUBSYSTEM:WINDOWS,"5.01"'])
env.Append(LINKFLAGS=['/OPT:REF', '/OPT:ICF'])
env.Append(CPPDEFINES=['_SCL_SECURE_NO_WARNINGS']) #Disable warnings about 'std::print'
if GetOption('static'):
env.Append(LINKFLAGS=['/NODEFAULTLIB:msvcrt.lib', '/LTCG'])
Expand Down
1 change: 1 addition & 0 deletions src/simulation/Simulation.cpp
Expand Up @@ -18,6 +18,7 @@
#include "Misc.h"
#include "ToolClasses.h"
#include "client/GameSave.h"
#include "common/tpt-compat.h"
#include "common/tpt-minmax.h"
#include "gui/game/Brush.h"

Expand Down

0 comments on commit 1237b49

Please sign in to comment.