1#######################################################################
2# SConscript for vega state_tracker
3
4Import('*')
5
6from sys import executable as python_cmd
7
8env = env.Clone()
9
10env.Append(CPPPATH = [
11    '#/src/mapi',
12])
13env.Append(CPPDEFINES = [
14    'VEGA_VERSION_STRING=',
15    'KHRONOS_DLL_EXPORTS',
16])
17
18vega_sources = [
19    'api.c',
20    'api_context.c',
21    'api_filters.c',
22    'api_images.c',
23    'api_masks.c',
24    'api_misc.c',
25    'api_paint.c',
26    'api_params.c',
27    'api_path.c',
28    'api_text.c',
29    'api_transform.c',
30    'arc.c',
31    'bezier.c',
32    'handle.c',
33    'image.c',
34    'mask.c',
35    'paint.c',
36    'path.c',
37    'polygon.c',
38    'renderer.c',
39    'shader.c',
40    'shaders_cache.c',
41    'stroker.c',
42    'text.c',
43    'vg_context.c',
44    'vg_manager.c',
45    'vg_state.c',
46    'vg_translate.c',
47    'vgu.c'
48]
49
50api_tmp = env.CodeGenerate(
51        target = '#/src/gallium/state_trackers/vega/api_tmp.h',
52        script = '#src/mapi/mapi/mapi_abi.py',
53        source = '#src/mapi/vgapi/vgapi.csv',
54        command = python_cmd + ' $SCRIPT --printer vgapi --mode app $SOURCE > $TARGET'
55)
56env.Depends(vega_sources, api_tmp)
57
58st_vega = env.ConvenienceLibrary(
59    target = 'st_vega',
60    source = vega_sources,
61)
62
63Export('st_vega')
64