Cocoa/DND : added bitmap data type handling in drag'n'drop operations
[blender.git] / intern / ghost / SConscript
1 #!/usr/bin/python
2 import sys
3 import os
4
5 Import ('env')
6
7 window_system = env['OURPLATFORM']
8
9 sources = env.Glob('intern/*.cpp')
10 if window_system == 'darwin':
11         sources += env.Glob('intern/*.mm')
12
13
14 pf = ['GHOST_DisplayManager', 'GHOST_System', 'GHOST_Window', 'GHOST_DropTarget']
15 defs=['_USE_MATH_DEFINES']
16
17 if window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd6', 'irix6', 'aix4', 'aix5'):
18         for f in pf:
19                 try:
20                         sources.remove('intern' + os.sep + f + 'Win32.cpp')
21                         sources.remove('intern' + os.sep + f + 'Carbon.cpp')
22                 except ValueError:
23                         pass
24 elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
25         for f in pf:
26                 try:
27                         sources.remove('intern' + os.sep + f + 'X11.cpp')
28                         sources.remove('intern' + os.sep + f + 'Carbon.cpp')
29                 except ValueError:
30                         pass
31 elif window_system == 'darwin':
32         if env['WITH_GHOST_COCOA']:
33                 if env['WITH_BF_QUICKTIME']:
34                         defs.append('WITH_QUICKTIME')
35                 if env['USE_QTKIT']:
36                         defs.append('USE_QTKIT')
37                 for f in pf:
38                         try:
39                                 sources.remove('intern' + os.sep + f + 'Win32.cpp')
40                                 sources.remove('intern' + os.sep + f + 'X11.cpp')
41                                 sources.remove('intern' + os.sep + f + 'Carbon.cpp')
42                         except ValueError:
43                                 pass
44         else:
45                 for f in pf:
46                         try:
47                                 sources.remove('intern' + os.sep + f + 'Win32.cpp')
48                                 sources.remove('intern' + os.sep + f + 'X11.cpp')
49                                 sources.remove('intern' + os.sep + f + 'Cocoa.mm')
50                         except ValueError:
51                                 pass
52
53 else:
54         print "Unknown window system specified."
55         Exit()
56
57 if env['BF_GHOST_DEBUG']:
58         defs.append('BF_GHOST_DEBUG')
59         
60 incs = '. ../string #extern/glew/include #source/blender/imbuf #source/blender/makesdna' + env['BF_OPENGL_INC']
61 if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
62         incs = env['BF_WINTAB_INC'] + ' ' + incs
63 env.BlenderLib ('bf_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15] ) 
64