From b258d23b714493274e9f8cfa60959b9814903602 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Thu, 7 Feb 2013 00:48:06 +0000 Subject: [PATCH] scons: [osx] make an attempt to add x11 to the pkgconfig path --- SConstruct | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index ad23409f..e541727f 100644 --- a/SConstruct +++ b/SConstruct @@ -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"])