meson: Add build Intel "anv" vulkan driver
[mesa.git] / src / util / meson.build
1 # Copyright © 2017 Intel Corporation
2
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to deal
5 # in the Software without restriction, including without limitation the rights
6 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 # copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
9
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
12
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 # SOFTWARE.
20
21 # TODO: subdir('xmlpool')
22 inc_util = include_directories('.')
23
24 files_mesa_util = files(
25 'bitscan.c',
26 'bitscan.h',
27 'bitset.h',
28 'build_id.c',
29 'build_id.h',
30 'crc32.c',
31 'crc32.h',
32 'debug.c',
33 'debug.h',
34 'disk_cache.c',
35 'disk_cache.h',
36 'format_r11g11b10f.h',
37 'format_rgb9e5.h',
38 'format_srgb.h',
39 'half_float.c',
40 'half_float.h',
41 'hash_table.c',
42 'hash_table.h',
43 'list.h',
44 'macros.h',
45 'mesa-sha1.c',
46 'mesa-sha1.h',
47 'sha1/sha1.c',
48 'sha1/sha1.h',
49 'ralloc.c',
50 'ralloc.h',
51 'rand_xor.c',
52 'rand_xor.h',
53 'register_allocate.c',
54 'register_allocate.h',
55 'rgtc.c',
56 'rgtc.h',
57 'rounding.h',
58 'set.c',
59 'set.h',
60 'simple_list.h',
61 'slab.c',
62 'slab.h',
63 'string_buffer.c',
64 'string_buffer.h',
65 'strndup.h',
66 'strtod.c',
67 'strtod.h',
68 'texcompress_rgtc_tmp.h',
69 'u_atomic.c',
70 'u_atomic.h',
71 'u_dynarray.h',
72 'u_endian.h',
73 'u_queue.c',
74 'u_queue.h',
75 'u_string.h',
76 'u_thread.h',
77 'u_vector.c',
78 'u_vector.h',
79 )
80
81 install_data('drirc', install_dir : get_option('sysconfdir'))
82
83 files_xmlconfig = files(
84 'xmlconfig.c',
85 'xmlconfig.h',
86 )
87
88 format_srgb = custom_target(
89 'format_srgb',
90 input : ['format_srgb.py'],
91 output : 'format_srgb.c',
92 command : [prog_python2, '@INPUT0@'],
93 capture : true,
94 )
95
96 libmesa_util = static_library(
97 'mesa_util',
98 [files_mesa_util, format_srgb],
99 include_directories : inc_common,
100 dependencies : [dep_zlib, dep_clock],
101 c_args : [c_msvc_compat_args, c_vis_args],
102 build_by_default : false
103 )
104
105 libxmlconfig = static_library(
106 'xmlconfig',
107 files_xmlconfig,
108 include_directories : inc_common,
109 dependencies : [dep_expat, dep_m],
110 c_args : [c_msvc_compat_args, c_vis_args,
111 '-DSYSCONFDIR="@0@"'.format(get_option('sysconfdir'))],
112 build_by_default : false,
113 )
114
115 if with_tests
116 u_atomic_test = executable(
117 'u_atomic_test',
118 files('u_atomic_test.c'),
119 include_directories : inc_common,
120 link_with : libmesa_util,
121 c_args : [c_msvc_compat_args],
122 )
123
124 roundeven_test = executable(
125 'roundeven_test',
126 files('roundeven_test.c'),
127 include_directories : inc_common,
128 c_args : [c_msvc_compat_args],
129 dependencies : [dep_m],
130 )
131
132 test('u_atomic', u_atomic_test)
133 test('roundeven', roundeven_test)
134
135 subdir('tests/hash_table')
136 subdir('tests/string_buffer')
137 endif