0fe39fa4873d29d8a4bbb746482a656847d26676
[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 build_by_default : true,
38 install : true
39 )
40
41 aubinator_error_decode = executable(
42 'aubinator_error_decode',
43 files('aubinator_error_decode.c'),
44 dependencies : [dep_zlib, dep_thread],
45 include_directories : [inc_common, inc_intel],
46 link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util],
47 c_args : [c_vis_args, no_override_init_args],
48 build_by_default : true,
49 install : true
50 )
51
52 error2aub = executable(
53 'intel_error2aub',
54 files('aub_write.h', 'aub_write.c', 'error2aub.c'),
55 dependencies : [dep_zlib, dep_dl, dep_thread, dep_m],
56 include_directories : [inc_common, inc_intel, inc_drm_uapi],
57 link_with : [libintel_dev],
58 c_args : [c_vis_args, no_override_init_args],
59 build_by_default : true,
60 install : true
61 )
62
63 sanitize_data = configuration_data()
64 sanitize_data.set(
65 'install_libexecdir',
66 join_paths(get_option('prefix'), get_option('libexecdir'))
67 )
68 configure_file(
69 input: 'intel_sanitize_gpu.in',
70 output: '@BASENAME@',
71 install_dir: get_option('bindir'),
72 install: true,
73 configuration: sanitize_data
74 )
75
76 libintel_sanitize_gpu = shared_library(
77 'intel_sanitize_gpu',
78 files('intel_sanitize_gpu.c'),
79 dependencies : [dep_dl, dep_thread],
80 include_directories : [inc_common, inc_intel, inc_drm_uapi],
81 link_with : [libintel_common, libmesa_util],
82 c_args : [c_vis_args, no_override_init_args],
83 build_by_default : true,
84 install_dir: get_option('libexecdir'),
85 install: true
86 )
87
88 configure_file(
89 input : 'intel_dump_gpu.in',
90 output : '@BASENAME@',
91 install_dir: get_option('bindir'),
92 configuration: sanitize_data,
93 install: true
94 )
95
96 libintel_dump_gpu = shared_library(
97 'intel_dump_gpu',
98 files('gen_context.h', 'gen8_context.h', 'gen10_context.h',
99 'intel_aub.h', 'aub_write.h', 'aub_write.c', 'intel_dump_gpu.c'),
100 dependencies : dep_dl,
101 include_directories : [inc_common, inc_intel, inc_drm_uapi],
102 link_with : libintel_dev,
103 c_args : [c_vis_args, no_override_init_args],
104 build_by_default : true,
105 install_dir: get_option('libexecdir'),
106 install: true
107 )
108
109 if with_tools.contains('intel-ui')
110 subdir('imgui')
111
112 aubinator_viewer = executable(
113 'aubinator_viewer',
114 files('aubinator_viewer.cpp', 'aubinator_viewer_decoder.cpp'),
115 dependencies : [dep_zlib, dep_dl, dep_thread, dep_m, libintel_imgui_gtk_dep],
116 include_directories : [inc_common, inc_intel],
117 link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util, libaub],
118 c_args : [c_vis_args, no_override_init_args],
119 cpp_args : [ '-fpermissive', '-std=c++11', '-Wno-parentheses', '-Wno-class-memaccess' ],
120 build_by_default : true,
121 install : true
122 )
123 endif