Created
August 3, 2010 23:20
-
-
Save jrabbit/507352 to your computer and use it in GitHub Desktop.
Quick and dirty script to set SDL env for Alien::SDL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from subprocess import * | |
import os | |
sdlconf = Popen(['sdl-config', '--prefix'], stdout=PIPE).communicate()[0] | |
pkgconf = Popen(['pkg-config','sdl', '--libs'], stdout=PIPE).communicate()[0] | |
if sdlconf: | |
prefix = sdlconf | |
elif pkgconf: | |
prefix = pkgconf.split()[0].split('/')[1] #/sw or /opt | |
SDL_INC = "%s/include" % prefix | |
SDL_LIB = "%s/lib" % prefix | |
os.system("export SDL_INC=%s") % SDL_INC | |
os.system("export SDL_LIB=%s") % SDL_LIB | |
#lipo -info /sw/lib/libSDL.dylib |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment