scons: [osx] make an attempt to add x11 to the pkgconfig path
This commit is contained in:
parent
d3f0cb48b7
commit
b258d23b71
10
SConstruct
10
SConstruct
|
@ -92,12 +92,18 @@ else:
|
||||||
print 'Could not find libgtk-2.0, exiting!'
|
print 'Could not find libgtk-2.0, exiting!'
|
||||||
Exit(1)
|
Exit(1)
|
||||||
# Add compiler and linker flags from pkg-config
|
# 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(CPPDEFINES=["_GTK2"])
|
||||||
env.Append(CCFLAGS = ["-D_GTK"])
|
env.Append(CCFLAGS = ["-D_GTK"])
|
||||||
if env['GTK3']:
|
if env['GTK3']:
|
||||||
# Add compiler and linker flags from pkg-config
|
# 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(CPPDEFINES=["_GTK3"])
|
||||||
env.Append(CCFLAGS = ["-D_GTK"])
|
env.Append(CCFLAGS = ["-D_GTK"])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue