scons: cleanup build scripts -- also check for GTK before building with GTK
This commit is contained in:
parent
78f279a717
commit
63aa42be96
13
SConstruct
13
SConstruct
|
@ -1,3 +1,11 @@
|
||||||
|
#
|
||||||
|
# SConstruct - build script for the SDL port of fceux
|
||||||
|
#
|
||||||
|
# You can adjust the BoolVariables below to include/exclude features at compile-time
|
||||||
|
#
|
||||||
|
# Use "scons" to compile and "scons install" to install.
|
||||||
|
#
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import platform
|
import platform
|
||||||
|
@ -19,7 +27,7 @@ opts.AddVariables(
|
||||||
AddOption('--prefix', dest='prefix', type='string', nargs=1, action='store', metavar='DIR', help='installation prefix')
|
AddOption('--prefix', dest='prefix', type='string', nargs=1, action='store', metavar='DIR', help='installation prefix')
|
||||||
|
|
||||||
prefix = GetOption('prefix')
|
prefix = GetOption('prefix')
|
||||||
env = Environment(options = opts, prefix = prefix)
|
env = Environment(options = opts)
|
||||||
|
|
||||||
#### Uncomment this for a public release ###
|
#### Uncomment this for a public release ###
|
||||||
# env.Append(CPPDEFINES=["PUBLIC_RELEASE"])
|
# env.Append(CPPDEFINES=["PUBLIC_RELEASE"])
|
||||||
|
@ -66,6 +74,9 @@ else:
|
||||||
print 'Did not find libSDL or SDL.lib, exiting!'
|
print 'Did not find libSDL or SDL.lib, exiting!'
|
||||||
Exit(1)
|
Exit(1)
|
||||||
if env['GTK']:
|
if env['GTK']:
|
||||||
|
if not conf.CheckLib('gtk-x11-2.0'):
|
||||||
|
print 'Could not find libgtk-2.0, exiting!'
|
||||||
|
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')
|
env.ParseConfig('pkg-config --cflags --libs gtk+-2.0')
|
||||||
env.Append(CPPDEFINES=["_GTK2"])
|
env.Append(CPPDEFINES=["_GTK2"])
|
||||||
|
|
Loading…
Reference in New Issue