drm-uapi: use local files, not system libdrm
[mesa.git] / src / intel / tools / 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 libaub = static_library(
22 'aub',
23 files('aub_read.c', 'aub_mem.c'),
24 include_directories : [inc_common, inc_intel],
25 link_with : [libintel_common, libintel_dev, libmesa_util],
26 c_args : [c_vis_args, no_override_init_args],
27 install : false
28 )
29
30 aubinator = executable(
31 'aubinator',
32 files('aubinator.c'),
33 dependencies : [dep_expat, dep_zlib, dep_dl, dep_thread, dep_m],
34 include_directories : [inc_common, inc_intel],
35 link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util, libaub],
36 c_args : [c_vis_args, no_override_init_args],
37 install : true
38 )
39
40 aubinator_error_decode = executable(
41 'aubinator_error_decode',
42 files('aubinator_error_decode.c'),
43 dependencies : [dep_zlib, dep_thread],
44 include_directories : [inc_common, inc_intel],
45 link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util],
46 c_args : [c_vis_args, no_override_init_args],
47 install : true
48 )
49
50 i965_disasm = executable(
51 'i965_disasm',
52 files('i965_disasm.c'),
53 dependencies : [dep_thread],
54 include_directories : [inc_common, inc_intel],
55 link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util],
56 c_args : [c_vis_args, no_override_init_args],
57 install : true
58 )
59
60 error2aub = executable(
61 'intel_error2aub',
62 files('aub_write.h', 'aub_write.c', 'error2aub.c'),
63 dependencies : [dep_zlib, dep_dl, dep_thread, dep_m],
64 include_directories : [inc_common, inc_intel, inc_include],
65 link_with : [libintel_dev],
66 c_args : [c_vis_args, no_override_init_args],
67 install : true
68 )
69
70 sanitize_data = configuration_data()
71 sanitize_data.set(
72 'install_libexecdir',
73 join_paths(get_option('prefix'), get_option('libexecdir'))
74 )
75 configure_file(
76 input : 'intel_sanitize_gpu.in',
77 output : '@BASENAME@',
78 install_dir : get_option('bindir'),
79 install : true,
80 configuration : sanitize_data
81 )
82
83 libintel_sanitize_gpu = shared_library(
84 'intel_sanitize_gpu',
85 files('intel_sanitize_gpu.c'),
86 dependencies : [dep_dl, dep_thread],
87 include_directories : [inc_common, inc_intel, inc_include],
88 link_with : [libintel_common, libmesa_util],
89 c_args : [c_vis_args, no_override_init_args, c_sse2_args],
90 install_dir : get_option('libexecdir'),
91 install : true
92 )
93
94 configure_file(
95 input : 'intel_dump_gpu.in',
96 output : '@BASENAME@',
97 install_dir : get_option('bindir'),
98 configuration : sanitize_data,
99 install : true
100 )
101
102 libintel_dump_gpu = shared_library(
103 'intel_dump_gpu',
104 files(
105 'gen_context.h', 'gen8_context.h', 'gen10_context.h', 'intel_aub.h',
106 'aub_write.h', 'aub_write.c', 'intel_dump_gpu.c',
107 ),
108 dependencies : dep_dl,
109 include_directories : [inc_common, inc_intel, inc_include],
110 link_with : libintel_dev,
111 c_args : [c_vis_args, no_override_init_args],
112 install_dir : get_option('libexecdir'),
113 install : true
114 )
115
116 if with_tools.contains('intel-ui')
117 subdir('imgui')
118
119 aubinator_viewer = executable(
120 'aubinator_viewer',
121 files('aubinator_viewer.cpp', 'aubinator_viewer_decoder.cpp'),
122 dependencies : [dep_zlib, dep_dl, dep_thread, dep_m, libintel_imgui_gtk_dep],
123 include_directories : [inc_common, inc_intel],
124 link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util, libaub],
125 c_args : [c_vis_args, no_override_init_args],
126 cpp_args : ['-fpermissive', '-Wno-parentheses', '-Wno-class-memaccess'],
127 install : true
128 )
129 endif