mesa: add Uniform*d support to display lists
[mesa.git] / src / mapi / glapi / 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 subdir('gen')
22
23 inc_glapi = include_directories('.')
24
25 static_glapi_files = []
26 static_glapi_args = []
27
28 if ['apple', 'windows'].contains(with_dri_platform)
29 static_glapi_files += [glapi_gentable_c, glapitable_h]
30 endif
31
32 if with_shared_glapi
33 static_glapi_files += files(
34 '../entry.c',
35 '../entry.h',
36 '../entry_x86-64_tls.h',
37 '../entry_x86_tls.h',
38 '../entry_x86_tsd.h',
39 '../entry_ppc64le_tls.h',
40 '../entry_ppc64le_tsd.h',
41 '../mapi_tmp.h',
42 )
43 static_glapi_files += glapi_mapi_tmp_h
44 static_glapi_args += [
45 '-DMAPI_MODE_BRIDGE',
46 '-DMAPI_ABI_HEADER="@0@"'.format(glapi_mapi_tmp_h.full_path()),
47 ]
48 else
49 static_glapi_args += '-DMAPI_MODE_UTIL'
50 static_glapi_files += files(
51 'glapi_dispatch.c',
52 'glapi_entrypoint.c',
53 'glapi_getproc.c',
54 'glapi_nop.c',
55 'glapi.c',
56 'glapi.h',
57 'glapi_priv.h',
58 )
59 static_glapi_files += files_mapi_util
60 static_glapi_files += [
61 glapitable_h, glapi_mapi_tmp_h, glprocs_h, glapitemp_h,
62 ]
63 if with_asm_arch == 'x86'
64 static_glapi_files += glapi_x86_s
65 elif with_asm_arch == 'x86_64'
66 static_glapi_files += glapi_x86_64_s
67 elif with_asm_arch == 'sparc'
68 static_glapi_files += glapi_sparc_s
69 endif
70 endif
71
72 libglapi_static = static_library(
73 'glapi_static',
74 static_glapi_files,
75 include_directories : [inc_mesa, inc_include, inc_src, inc_mapi],
76 c_args : [c_msvc_compat_args, static_glapi_args],
77 dependencies : [dep_thread, dep_selinux],
78 build_by_default : false,
79 )
80
81 if not with_shared_glapi and with_tests
82 test(
83 'glapi_static_check_table',
84 executable(
85 'glapi_static_check_table',
86 ['tests/check_table.cpp', glapitable_h],
87 include_directories : [inc_include, inc_src, inc_mesa, inc_mapi],
88 link_with : [libglapi_static],
89 dependencies : [idep_gtest, dep_thread],
90 )
91 )
92 endif