7 window_system = env['OURPLATFORM']
9 sources = env.Glob('intern/*.cpp')
10 if window_system == 'darwin':
11 sources += env.Glob('intern/*.mm')
14 pf = ['GHOST_DisplayManager', 'GHOST_System', 'GHOST_SystemPaths', 'GHOST_Window', 'GHOST_DropTarget', 'GHOST_NDOFManager']
15 defs=['_USE_MATH_DEFINES']
17 incs = '. ../string #extern/glew/include #source/blender/imbuf #source/blender/makesdna ' + env['BF_OPENGL_INC']
19 if env['WITH_GHOST_SDL']:
22 sources.remove('intern' + os.sep + f + 'Carbon.cpp')
23 sources.remove('intern' + os.sep + f + 'Win32.cpp')
24 sources.remove('intern' + os.sep + f + 'X11.cpp')
27 incs += ' ' + env['BF_SDL_INC']
28 defs += ['WITH_GHOST_SDL']
29 elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'aix4', 'aix5'):
32 sources.remove('intern' + os.sep + f + 'Win32.cpp')
33 sources.remove('intern' + os.sep + f + 'Carbon.cpp')
34 sources.remove('intern' + os.sep + f + 'SDL.cpp')
37 ## removing because scons does not support system installation
38 ## if this is used for blender.org builds it means our distrobution
39 ## will find any locally installed blender and double up its script path.
40 ## So until this is supported properly as with CMake,
41 ## just dont use the PREFIX.
42 # defs += ['PREFIX=\\"/usr/local/\\"'] # XXX, make an option
43 defs += ['WITH_X11_XINPUT'] # XXX, make an option
45 elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
48 sources.remove('intern' + os.sep + f + 'X11.cpp')
49 sources.remove('intern' + os.sep + f + 'Carbon.cpp')
50 sources.remove('intern' + os.sep + f + 'SDL.cpp')
53 elif window_system == 'darwin':
54 if env['WITH_GHOST_COCOA']:
55 if env['WITH_BF_QUICKTIME']:
56 defs.append('WITH_QUICKTIME')
58 defs.append('USE_QTKIT')
61 sources.remove('intern' + os.sep + f + 'Win32.cpp')
62 sources.remove('intern' + os.sep + f + 'X11.cpp')
63 sources.remove('intern' + os.sep + f + 'Carbon.cpp')
64 sources.remove('intern' + os.sep + f + 'SDL.cpp')
70 sources.remove('intern' + os.sep + f + 'Win32.cpp')
71 sources.remove('intern' + os.sep + f + 'X11.cpp')
72 sources.remove('intern' + os.sep + f + 'Cocoa.mm')
73 sources.remove('intern' + os.sep + f + 'SDL.cpp')
78 print "Unknown window system specified."
81 if env['BF_GHOST_DEBUG']:
82 defs.append('WITH_GHOST_DEBUG')
84 sources.remove('intern' + os.sep + 'GHOST_EventPrinter.cpp')
86 if env['WITH_BF_3DMOUSE']:
87 defs.append('WITH_INPUT_NDOF')
89 if env['OURPLATFORM']=='linux':
90 incs += ' ' + env['BF_3DMOUSE_INC']
92 sources.remove('intern' + os.sep + 'GHOST_NDOFManager.cpp')
94 if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
95 sources.remove('intern' + os.sep + 'GHOST_NDOFManagerWin32.cpp')
96 elif window_system=='darwin':
97 sources.remove('intern' + os.sep + 'GHOST_NDOFManagerCocoa.mm')
99 sources.remove('intern' + os.sep + 'GHOST_NDOFManagerX11.cpp')
104 if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
105 incs = env['BF_WINTAB_INC'] + ' ' + incs
107 if window_system in ('win32-vc', 'win64-vc'):
108 env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15]) #, cc_compileflags=env['CCFLAGS'].append('/WX') )
110 elif env['WITH_GHOST_COCOA']: # always use Apple-gcc-4.2 for objC language, for gnu-compilers do not support it fully yet
111 env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15], cc_compilerchange='/usr/bin/gcc-4.2', cxx_compilerchange='/usr/bin/g++-4.2' )
112 print "GHOST COCOA WILL BE COMPILED WITH APPLE GCC"
115 env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15] )