buildsystem cleanup: remove duplicate source & includes for scons,
[blender.git] / source / blender / gpu / SConscript
1 #!/usr/bin/python
2 Import ('env')
3
4 sources = env.Glob('intern/*.c')
5 sources += env.Glob('shaders/*.c')
6
7 defs = [ 'GLEW_STATIC' ]
8
9 incs = '../blenlib ../blenkernel ../makesdna ../makesrna ../include ../blenloader ../nodes ../nodes/intern'
10 incs += ' #/extern/glew/include #intern/guardedalloc #intern/smoke/extern ../imbuf .'
11
12 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
13     incs += ' ' + env['BF_PTHREADS_INC']
14
15 incs += ' ' + env['BF_OPENGL_INC']
16
17 if env['WITH_BF_SMOKE']:
18     defs.append('WITH_SMOKE')
19
20 if env['WITH_BF_DDS']:
21         defs.append('WITH_DDS')
22
23 # generated data files
24 import os
25 sources.extend((
26         os.path.join(env['DATA_SOURCES'], "gpu_shader_material.glsl.c"),
27         os.path.join(env['DATA_SOURCES'], "gpu_shader_vertex.glsl.c"),
28         os.path.join(env['DATA_SOURCES'], "gpu_shader_sep_gaussian_blur_frag.glsl.c"),
29         os.path.join(env['DATA_SOURCES'], "gpu_shader_sep_gaussian_blur_vert.glsl.c"),
30         os.path.join(env['DATA_SOURCES'], "gpu_shader_vsm_store_frag.glsl.c"),
31         os.path.join(env['DATA_SOURCES'], "gpu_shader_vsm_store_vert.glsl.c"),
32         ))
33
34 env.BlenderLib ( 'bf_gpu', sources, Split(incs), defines = defs, libtype=['core','player'], priority=[160,110] )