diff --git a/SConstruct b/SConstruct index 2e11970e..5b724ef2 100644 --- a/SConstruct +++ b/SConstruct @@ -12,7 +12,7 @@ opts.AddVariables( BoolVariable('NEWPPU', 'Enable new PPU core', 1), BoolVariable('CREATE_AVI', 'Enable avi creation support (SDL only)', 1), BoolVariable('LOGO', 'Enable a logoscreen when creating avis (SDL only)', '1'), - BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 0), + BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 1), BoolVariable('GTK3', 'Enable GTK3 GUI (SDL only)', 0), ) @@ -59,6 +59,16 @@ else: if not conf.CheckLib('SDL'): print 'Did not find libSDL or SDL.lib, exiting!' Exit(1) + if env['GTK']: + # Add compiler and linker flags from pkg-config + env.ParseConfig('pkg-config --cflags --libs gtk+-2.0') + 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') + env.Append(CPPDEFINES=["_GTK3"]) + env.Append(CCFLAGS = ["-D_GTK"]) ### Lua platform defines ### Applies to all files even though only lua needs it, but should be ok diff --git a/src/drivers/sdl/SConscript b/src/drivers/sdl/SConscript index eaea9093..ca005a50 100644 --- a/src/drivers/sdl/SConscript +++ b/src/drivers/sdl/SConscript @@ -2,19 +2,8 @@ # Thanks Antonio Ospite! Import('env') env.ParseConfig('pkg-config --cflags --libs x11') -if env['GTK']: - # Add compiler and linker flags from pkg-config - env.ParseConfig('pkg-config --cflags --libs gtk+-2.0') - 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') - env.Append(CPPDEFINES=["_GTK3"]) - env.Append(CCFLAGS = ["-D_GTK"]) Export('env') - my_list = Split(""" input.cpp config.cpp