Fix scons+cl build
This commit is contained in:
38
SConstruct
38
SConstruct
@@ -50,7 +50,7 @@ else:
|
||||
""")
|
||||
|
||||
if str(platform) == "darwin":
|
||||
env.Append(CXXFLAGS="-std=c++11 -stdlib=libc++ -include src/global.hpp", RPATH='../Frameworks')
|
||||
env.Append(CXXFLAGS="-std=c++11 -stdlib=libc++ -include global.hpp", RPATH='../Frameworks')
|
||||
env["CC"] = 'clang'
|
||||
env["CXX"] = 'clang++'
|
||||
env.Append(BUILDERS={
|
||||
@@ -134,7 +134,7 @@ elif str(platform) == "win32":
|
||||
if 'msvc' in env['TOOLS']:
|
||||
env.Append(
|
||||
LINKFLAGS='/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup /MACHINE:X86',
|
||||
CXXFLAGS='/EHsc /MD /FIsrc/global.hpp',
|
||||
CXXFLAGS='/EHsc /MD /FIglobal.hpp',
|
||||
LIBPATH=("C:\Program Files (x86)\Microsoft Visual Studio " + env['MSVC_VERSION'] + "\VC\lib"),
|
||||
LIBS=Split("""
|
||||
kernel32
|
||||
@@ -196,6 +196,23 @@ if path.exists('deps/lib'):
|
||||
if path.exists('deps/include'):
|
||||
env.Append(CPPPATH='deps/include')
|
||||
|
||||
# Include directories
|
||||
|
||||
env.Append(CPPPATH=Split("""
|
||||
#src/
|
||||
#src/classes/
|
||||
#src/tools/
|
||||
#src/fileio/
|
||||
#src/fileio/gzstream/
|
||||
#src/fileio/resmgr/
|
||||
#src/fileio/xml-parser/
|
||||
#src/gfx/
|
||||
#src/dialogxml/dialogs/
|
||||
#src/dialogxml/widgets/
|
||||
#src/scenario/
|
||||
#src/universe/
|
||||
"""))
|
||||
|
||||
env['CONFIGUREDIR'] = '#build/conf'
|
||||
env['CONFIGURELOG'] = '#build/conf/config.log'
|
||||
if not env.GetOption('clean'):
|
||||
@@ -260,23 +277,6 @@ if not env.GetOption('clean'):
|
||||
|
||||
env.Append(CPPDEFINES="TIXML_USE_TICPP")
|
||||
|
||||
# Include directories
|
||||
|
||||
env.Append(CPPPATH=Split("""
|
||||
#src/
|
||||
#src/classes/
|
||||
#src/tools/
|
||||
#src/fileio/
|
||||
#src/fileio/gzstream/
|
||||
#src/fileio/resmgr/
|
||||
#src/fileio/xml-parser/
|
||||
#src/gfx/
|
||||
#src/dialogxml/dialogs/
|
||||
#src/dialogxml/widgets/
|
||||
#src/scenario/
|
||||
#src/universe/
|
||||
"""))
|
||||
|
||||
if str(platform) == "win32":
|
||||
# For the *resource.h headers
|
||||
env.Append(CPPPATH="#rsrc/menus")
|
||||
|
@@ -15,7 +15,7 @@ env.Install(path.join(data_dir, "graphics"), Glob("graphics/*.png"))
|
||||
env.Install(path.join(data_dir, "sounds"), Glob("sounds/*.WAV"))
|
||||
env.Install(path.join(data_dir, "strings"), Glob("strings/*.txt"))
|
||||
|
||||
env.Install(path.join(data_dir, "shaders"), Glob("#src/tools/mask.*"))
|
||||
env.Install(path.join(data_dir, "shaders"), Glob("#src/gfx/mask.*"))
|
||||
|
||||
# Scenarios
|
||||
|
||||
|
@@ -2,7 +2,8 @@
|
||||
Import("env")
|
||||
|
||||
env = env.Clone()
|
||||
env.Append(CXXFLAGS="-fpermissive")
|
||||
if 'msvc' not in env["TOOLS"]:
|
||||
env.Append(CXXFLAGS="-fpermissive")
|
||||
dlog_util = env.StaticLibrary("#build/lib/dlogutil", Glob("dialogs/*.cpp") + Glob("widgets/*.cpp") + Glob("../fileio/xml-parser/*.cpp"))
|
||||
|
||||
Return("dlog_util")
|
Reference in New Issue
Block a user