SCons updates
[blender.git] / intern / ghost / SConscript
1 ghost_env = Environment()
2
3 # Import the C flags set in the SConstruct file
4 Import ('cflags')
5 Import ('cxxflags')
6 Import ('defines')
7 Import ('user_options_dict')
8 Import ('window_system')
9 ghost_env.Append (CCFLAGS = cflags)
10 ghost_env.Append (CXXFLAGS = cxxflags)
11 ghost_env.Append (CPPDEFINES = defines)
12
13 source_files = ['intern/GHOST_Buttons.cpp',
14                 'intern/GHOST_C-api.cpp',
15                 'intern/GHOST_CallbackEventConsumer.cpp',
16                 'intern/GHOST_DisplayManager.cpp',
17                 'intern/GHOST_EventManager.cpp',
18                 'intern/GHOST_EventPrinter.cpp',
19                 'intern/GHOST_ISystem.cpp',
20                 'intern/GHOST_ModifierKeys.cpp',
21                 'intern/GHOST_Rect.cpp',
22                 'intern/GHOST_System.cpp',
23                 'intern/GHOST_TimerManager.cpp',
24                 'intern/GHOST_Window.cpp',
25                 'intern/GHOST_WindowManager.cpp']
26
27 if window_system == 'X11':
28     source_files += ['intern/GHOST_DisplayManagerX11.cpp',
29                      'intern/GHOST_SystemX11.cpp',
30                      'intern/GHOST_WindowX11.cpp']
31 elif window_system == 'WIN32':
32     source_files += ['intern/GHOST_DisplayManagerWin32.cpp',
33                      'intern/GHOST_SystemWin32.cpp',
34                      'intern/GHOST_WindowWin32.cpp']
35 elif window_system == 'CARBON':
36     source_files += ['intern/GHOST_DisplayManagerCarbon.cpp',
37                      'intern/GHOST_SystemCarbon.cpp',
38                      'intern/GHOST_WindowCarbon.cpp']
39 else:
40     print "Unknown window system specified."
41
42 ghost_env.Append (CPPPATH = ['.',
43                              '../string'])
44
45 ghost_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_GHOST', source=source_files)