scons: [osx] make an attempt to add x11 to the pkgconfig path

This commit is contained in:
punkrockguy318 2013-02-07 00:48:06 +00:00
parent d3f0cb48b7
commit b258d23b71
1 changed files with 8 additions and 2 deletions

View File

@ -92,12 +92,18 @@ else:
print 'Could not find libgtk-2.0, exiting!'
Exit(1)
# Add compiler and linker flags from pkg-config
env.ParseConfig('pkg-config --cflags --libs gtk+-2.0')
config_string = 'pkg-config --cflags --libs gtk+-2.0'
if env['PLATFORM'] == 'darwin':
config_string = 'PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/ ' + config_string
env.ParseConfig(config_string)
env.Append(CPPDEFINES=["_GTK2"])
env.Append(CCFLAGS = ["-D_GTK"])
if env['GTK3']:
# Add compiler and linker flags from pkg-config
env.ParseConfig('pkg-config --cflags --libs gtk+-3.0')
config_string = 'pkg-config --cflags --libs gtk+-3.0'
if env['PLATFORM'] == 'darwin':
config_string = 'PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/ ' + config_string
env.ParseConfig(config_string)
env.Append(CPPDEFINES=["_GTK3"])
env.Append(CCFLAGS = ["-D_GTK"])