xref: /third_party/mesa3d/src/util/format/meson.build (revision bf215546)
1bf215546Sopenharmony_ci# Copyright © 2019 Google LLC
2bf215546Sopenharmony_ci
3bf215546Sopenharmony_ci# Permission is hereby granted, free of charge, to any person obtaining a copy
4bf215546Sopenharmony_ci# of this software and associated documentation files (the "Software"), to deal
5bf215546Sopenharmony_ci# in the Software without restriction, including without limitation the rights
6bf215546Sopenharmony_ci# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7bf215546Sopenharmony_ci# copies of the Software, and to permit persons to whom the Software is
8bf215546Sopenharmony_ci# furnished to do so, subject to the following conditions:
9bf215546Sopenharmony_ci
10bf215546Sopenharmony_ci# The above copyright notice and this permission notice shall be included in
11bf215546Sopenharmony_ci# all copies or substantial portions of the Software.
12bf215546Sopenharmony_ci
13bf215546Sopenharmony_ci# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14bf215546Sopenharmony_ci# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15bf215546Sopenharmony_ci# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16bf215546Sopenharmony_ci# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17bf215546Sopenharmony_ci# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18bf215546Sopenharmony_ci# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19bf215546Sopenharmony_ci# SOFTWARE.
20bf215546Sopenharmony_ci
21bf215546Sopenharmony_cifiles_mesa_format = [
22bf215546Sopenharmony_ci  'u_format.c',
23bf215546Sopenharmony_ci  'u_format_bptc.c',
24bf215546Sopenharmony_ci  'u_format_etc.c',
25bf215546Sopenharmony_ci  'u_format_fxt1.c',
26bf215546Sopenharmony_ci  'u_format_latc.c',
27bf215546Sopenharmony_ci  'u_format_other.c',
28bf215546Sopenharmony_ci  'u_format_rgtc.c',
29bf215546Sopenharmony_ci  'u_format_s3tc.c',
30bf215546Sopenharmony_ci  'u_format_tests.c',
31bf215546Sopenharmony_ci  'u_format_unpack_neon.c',
32bf215546Sopenharmony_ci  'u_format_yuv.c',
33bf215546Sopenharmony_ci  'u_format_zs.c',
34bf215546Sopenharmony_ci]
35bf215546Sopenharmony_ci
36bf215546Sopenharmony_ciu_format_pack_h = custom_target(
37bf215546Sopenharmony_ci  'u_format_pack.h',
38bf215546Sopenharmony_ci  input : ['u_format_table.py', 'u_format.csv'],
39bf215546Sopenharmony_ci  output : 'u_format_pack.h',
40bf215546Sopenharmony_ci  command : [prog_python, '@INPUT@', '--header'],
41bf215546Sopenharmony_ci  depend_files : files('u_format_pack.py', 'u_format_parse.py'),
42bf215546Sopenharmony_ci  capture : true,
43bf215546Sopenharmony_ci)
44bf215546Sopenharmony_ci
45bf215546Sopenharmony_ciu_format_table_c = custom_target(
46bf215546Sopenharmony_ci  'u_format_table.c',
47bf215546Sopenharmony_ci  input : ['u_format_table.py', 'u_format.csv'],
48bf215546Sopenharmony_ci  output : 'u_format_table.c',
49bf215546Sopenharmony_ci  command : [prog_python, '@INPUT@'],
50bf215546Sopenharmony_ci  depend_files : files('u_format_pack.py', 'u_format_parse.py'),
51bf215546Sopenharmony_ci  capture : true,
52bf215546Sopenharmony_ci)
53bf215546Sopenharmony_ci
54bf215546Sopenharmony_cilibmesa_format = static_library(
55bf215546Sopenharmony_ci  'mesa_format',
56bf215546Sopenharmony_ci  [files_mesa_format, u_format_table_c, u_format_pack_h],
57bf215546Sopenharmony_ci  include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
58bf215546Sopenharmony_ci  # NOTE dep_valgrind used here instead of idep_mesautil due to chicken/egg
59bf215546Sopenharmony_ci  # dependencies between util and util/format
60bf215546Sopenharmony_ci  dependencies : [dep_m, dep_valgrind],
61bf215546Sopenharmony_ci  c_args : [c_msvc_compat_args],
62bf215546Sopenharmony_ci  gnu_symbol_visibility : 'hidden',
63bf215546Sopenharmony_ci  build_by_default : false
64bf215546Sopenharmony_ci)
65