fixed sdl/SConscript to only compile gui.cpp when using GTK in SConstruct

This commit is contained in:
xhainingx 2013-04-18 05:27:54 +00:00
parent 78770114f9
commit 992166852c
2 changed files with 6 additions and 2 deletions

View File

@ -12,18 +12,19 @@ source_list = Split(
input.cpp input.cpp
config.cpp config.cpp
sdl.cpp sdl.cpp
gui.cpp
sdl-joystick.cpp sdl-joystick.cpp
sdl-sound.cpp sdl-sound.cpp
sdl-throttle.cpp sdl-throttle.cpp
sdl-video.cpp sdl-video.cpp
unix-netplay.cpp unix-netplay.cpp
game.cpp
""") """)
Import('env') Import('env')
if 'GL' in env['LIBS']: if 'GL' in env['LIBS']:
source_list.append('sdl-opengl.cpp') source_list.append('sdl-opengl.cpp')
if env['GTK'] or env['GTK3']:
source_list.append('gui.cpp')
source_list = ['drivers/sdl/' + source for source in source_list] source_list = ['drivers/sdl/' + source for source in source_list]
Return('source_list') Return('source_list')

View File

@ -21,7 +21,10 @@
#define FCEUX_GUI_H #define FCEUX_GUI_H
#define GTK #define GTK
#ifdef _GTK
#include <gtk/gtk.h> #include <gtk/gtk.h>
#endif
extern GtkWidget* MainWindow; extern GtkWidget* MainWindow;
extern GtkWidget* evbox; extern GtkWidget* evbox;
extern GtkRadioAction* stateSlot; extern GtkRadioAction* stateSlot;