Attempt to fix the AppVeyor build
[mesa.git] / src / util / SConscript
1 import common
2
3 Import('*')
4
5 from sys import executable as python_cmd
6
7 env = env.Clone()
8
9 env.MSVC2013Compat()
10
11 env.Prepend(CPPPATH = [
12 '#include',
13 xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
14 '#src',
15 '#src/mapi',
16 '#src/mesa',
17 '#src/gallium/include',
18 '#src/gallium/auxiliary',
19 '#src/util',
20 ])
21
22 env.CodeGenerate(
23 target = 'format_srgb.c',
24 script = 'format_srgb.py',
25 source = [],
26 command = python_cmd + ' $SCRIPT > $TARGET'
27 )
28
29 # parse Makefile.sources
30 source_lists = env.ParseSourceList('Makefile.sources')
31
32 mesautil_sources = (
33 source_lists['MESA_UTIL_FILES'] +
34 source_lists['MESA_UTIL_GENERATED_FILES'] +
35 source_lists['XMLCONFIG_FILES']
36 )
37
38 mesautilenv = env.Clone()
39
40 mesautilenv.AppendUnique(LIBS = [
41 'expat',
42 ])
43
44 mesautil = mesautilenv.ConvenienceLibrary(
45 target = 'mesautil',
46 source = mesautil_sources,
47 )
48
49 env.Alias('mesautil', mesautil)
50 Export('mesautil')
51
52
53 u_atomic_test = env.Program(
54 target = 'u_atomic_test',
55 source = ['u_atomic_test.c'],
56 )
57 env.UnitTest("u_atomic_test", u_atomic_test)
58
59 roundeven_test = env.Program(
60 target = 'roundeven_test',
61 source = ['roundeven_test.c'],
62 )
63 env.UnitTest("roundeven_test", roundeven_test)