Permalink
Browse files

Fix mac sdl compile (apparently it actually did need to run sdl-config)

  • Loading branch information...
jacob1 committed Jan 24, 2016
1 parent 82257e5 commit dfbfb459d16ceaf94b4b4f5e187403f3aaee6ded
Showing with 9 additions and 2 deletions.
  1. +9 −2 SConscript
@@ -127,6 +127,10 @@ if tool:
env['STRIP'] = tool+'strip'
if os.path.isdir("/usr/{0}/bin".format(tool[:-1])):
env['ENV']['PATH'] = "/usr/{0}/bin:{1}".format(tool[:-1], os.environ['PATH'])
if platform == "Darwin":
sdlconfigpath = "/usr/lib/apple/SDKs/MacOSX10.5.sdk/usr/bin"
if os.path.isdir(sdlconfigpath):
env['ENV']['PATH'] = "{0}:{1}".format(sdlconfigpath, env['ENV']['PATH'])
#copy environment variables because scons doesn't do this by default
for var in ["CC","CXX","LD","LIBPATH"]:
@@ -239,10 +243,13 @@ def findLibs(env, conf):
FatalError("SDL framework not found or not installed")
else:
FatalError("SDL development library not found or not installed")
if platform == "Linux" or (compilePlatform == "Linux" and platform != "Darwin"):
if platform == "Linux" or compilePlatform == "Linux":
try:
env.ParseConfig('sdl-config --cflags')
env.ParseConfig('sdl-config --libs')
if GetOption('static'):
env.ParseConfig('sdl-config --static-libs')
else:
env.ParseConfig('sdl-config --libs')
except:
pass

0 comments on commit dfbfb45

Please sign in to comment.