mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-09 09:56:35 +02:00
fix crosscompiling, --lua-dir was being ignored
This commit is contained in:
19
SConscript
19
SConscript
@@ -176,19 +176,20 @@ if not GetOption("macosx"):
|
|||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
|
|
||||||
|
|
||||||
# if lua is enabled try to parse the lua pgk-config, if that fails try the lua-dir option
|
# if lua is enabled try to parse the lua pgk-config, or the lua-dir option if given
|
||||||
# .. : TODO: make this look the same as the SDL check, maybe make a function for it. keep it DRY.
|
|
||||||
|
|
||||||
if not GetOption("nolua"):
|
if(GetOption("lua-dir")):
|
||||||
|
if not conf.CheckCHeader(GetOption("lua-dir") + '/lua.h'):
|
||||||
|
print "lua5.1 headers not found or not installed"
|
||||||
|
raise SystemExit(1)
|
||||||
|
else:
|
||||||
|
env.Append(CPPPATH=[GetOption("lua-dir")])
|
||||||
|
else:
|
||||||
try:
|
try:
|
||||||
env.ParseConfig('pkg-config --cflags lua5.1')
|
env.ParseConfig('pkg-config --cflags lua5.1')
|
||||||
except:
|
except:
|
||||||
if(GetOption("lua-dir")):
|
print "lua5.1 headers not found or not installed"
|
||||||
if not conf.CheckCHeader(GetOption("lua-dir") + '/lua.h'):
|
raise SystemExit(1)
|
||||||
print "lua5.1 headers not found or not installed"
|
|
||||||
raise SystemExit(1)
|
|
||||||
else:
|
|
||||||
env.Append(CPPPATH=[GetOption("lua-dir")])
|
|
||||||
|
|
||||||
# if fft is enabled try to parse its config, fail otherwise.
|
# if fft is enabled try to parse its config, fail otherwise.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user