mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-11 19:04:05 +02:00
msvc compiling fixes
This commit is contained in:
12
SConscript
12
SConscript
@@ -92,7 +92,9 @@ if msvc and platform != "Windows":
|
|||||||
FatalError("Error: --msvc only works on windows")
|
FatalError("Error: --msvc only works on windows")
|
||||||
|
|
||||||
#Create SCons Environment
|
#Create SCons Environment
|
||||||
if platform == "Windows" and not GetOption('msvc'):
|
if GetOption('msvc'):
|
||||||
|
env = Environment(tools = ['default'], ENV = {'PATH' : os.environ['PATH'], 'TMP' : os.environ['TMP']}, TARGET_ARCH = 'x86')
|
||||||
|
elif platform == "Windows" and not GetOption('msvc'):
|
||||||
env = Environment(tools = ['mingw'], ENV = {'PATH' : os.environ['PATH']})
|
env = Environment(tools = ['mingw'], ENV = {'PATH' : os.environ['PATH']})
|
||||||
else:
|
else:
|
||||||
env = Environment(tools = ['default'], ENV = {'PATH' : os.environ['PATH']})
|
env = Environment(tools = ['default'], ENV = {'PATH' : os.environ['PATH']})
|
||||||
@@ -168,6 +170,7 @@ if GetOption("msvc"):
|
|||||||
env.Append(LIBPATH=['StaticLibs/'])
|
env.Append(LIBPATH=['StaticLibs/'])
|
||||||
else:
|
else:
|
||||||
env.Append(LIBPATH=['Libraries/'])
|
env.Append(LIBPATH=['Libraries/'])
|
||||||
|
env.Append(CPPPATH=['includes/'])
|
||||||
|
|
||||||
#Check 32/64 bit
|
#Check 32/64 bit
|
||||||
def CheckBit(context):
|
def CheckBit(context):
|
||||||
@@ -282,7 +285,7 @@ def findLibs(env, conf):
|
|||||||
FatalError("bzip2 headers not found")
|
FatalError("bzip2 headers not found")
|
||||||
|
|
||||||
#Look for libz
|
#Look for libz
|
||||||
if not conf.CheckLib('z'):
|
if not conf.CheckLib(['z', 'zlib']):
|
||||||
FatalError("libz not found or not installed")
|
FatalError("libz not found or not installed")
|
||||||
|
|
||||||
#Look for pthreads
|
#Look for pthreads
|
||||||
@@ -342,7 +345,7 @@ elif not GetOption('help'):
|
|||||||
conf.AddTest('CheckBit', CheckBit)
|
conf.AddTest('CheckBit', CheckBit)
|
||||||
if not conf.CheckCC() or not conf.CheckCXX():
|
if not conf.CheckCC() or not conf.CheckCXX():
|
||||||
FatalError("compiler not correctly configured")
|
FatalError("compiler not correctly configured")
|
||||||
if platform == compilePlatform and isX86 and not GetOption('32bit') and not GetOption('64bit'):
|
if platform == compilePlatform and isX86 and not GetOption('32bit') and not GetOption('64bit') and not GetOption('msvc'):
|
||||||
conf.CheckBit()
|
conf.CheckBit()
|
||||||
findLibs(env, conf)
|
findLibs(env, conf)
|
||||||
env = conf.Finish()
|
env = conf.Finish()
|
||||||
@@ -381,7 +384,8 @@ if isX86:
|
|||||||
if not GetOption('no-sse'):
|
if not GetOption('no-sse'):
|
||||||
if GetOption('sse'):
|
if GetOption('sse'):
|
||||||
if msvc:
|
if msvc:
|
||||||
env.Append(CCFLAGS=['/arch:SSE'])
|
if not GetOption('sse2'):
|
||||||
|
env.Append(CCFLAGS=['/arch:SSE'])
|
||||||
else:
|
else:
|
||||||
env.Append(CCFLAGS=['-msse'])
|
env.Append(CCFLAGS=['-msse'])
|
||||||
env.Append(CPPDEFINES=['X86_SSE'])
|
env.Append(CPPDEFINES=['X86_SSE'])
|
||||||
|
Reference in New Issue
Block a user