diff options
author | Dylan Baker | 2017-09-13 13:46:13 -0500 |
---|---|---|
committer | Dylan Baker | 2018-01-12 11:40:48 -0600 |
commit | 5f7deb50787b82038cc35fb1e31b761e33e5a341 (patch) | |
tree | 6a9fe255f2c5a8b0ab556118fb0cd3dd9de17634 /intel | |
parent | f115de819bc10bb36565f344a66fa619219911b9 (diff) | |
download | external-libdrm-5f7deb50787b82038cc35fb1e31b761e33e5a341.tar.gz external-libdrm-5f7deb50787b82038cc35fb1e31b761e33e5a341.tar.xz external-libdrm-5f7deb50787b82038cc35fb1e31b761e33e5a341.zip |
Add meson build system
This patch adds a complete meson build system, including tests and
install. It has the necessary hooks to allow it be used as a subproject
for other meson based builds such as mesa.
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-and-tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Diffstat (limited to 'intel')
-rw-r--r-- | intel/meson.build | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/intel/meson.build b/intel/meson.build new file mode 100644 index 00000000..ad877274 --- /dev/null +++ b/intel/meson.build | |||
@@ -0,0 +1,105 @@ | |||
1 | # Copyright © 2017-2018 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 | libdrm_intel = shared_library( | ||
22 | 'drm_intel', | ||
23 | [ | ||
24 | files( | ||
25 | 'intel_bufmgr.c', 'intel_bufmgr_fake.c', 'intel_bufmgr_gem.c', | ||
26 | 'intel_decode.c', 'mm.c', | ||
27 | ), | ||
28 | config_file, | ||
29 | ], | ||
30 | include_directories : [inc_root, inc_drm], | ||
31 | link_with : libdrm, | ||
32 | dependencies : [dep_pciaccess, dep_pthread_stubs, dep_rt, dep_valgrind], | ||
33 | c_args : warn_c_args, | ||
34 | version : '1.0.0', | ||
35 | install : true, | ||
36 | ) | ||
37 | |||
38 | ext_libdrm_intel = declare_dependency( | ||
39 | link_with : [libdrm, libdrm_intel], | ||
40 | include_directories : [inc_drm, include_directories('.')], | ||
41 | ) | ||
42 | |||
43 | install_headers( | ||
44 | 'intel_bufmgr.h', 'intel_aub.h', 'intel_debug.h', | ||
45 | subdir : 'libdrm', | ||
46 | ) | ||
47 | |||
48 | pkg.generate( | ||
49 | name : 'libdrm_intel', | ||
50 | libraries : libdrm_intel, | ||
51 | subdirs : ['.', 'libdrm'], | ||
52 | version : meson.project_version(), | ||
53 | requires : 'libdrm', | ||
54 | description : 'Userspace interface to intel kernel DRM services', | ||
55 | ) | ||
56 | |||
57 | test_decode = executable( | ||
58 | 'test_decode', | ||
59 | files('test_decode.c'), | ||
60 | include_directories : [inc_root, inc_drm], | ||
61 | link_with : [libdrm, libdrm_intel], | ||
62 | c_args : warn_c_args, | ||
63 | ) | ||
64 | |||
65 | test( | ||
66 | 'gen4-3d.batch', | ||
67 | prog_bash, | ||
68 | args : files('tests/gen4-3d.batch.sh'), | ||
69 | workdir : meson.current_build_dir(), | ||
70 | ) | ||
71 | test( | ||
72 | 'gen45-3d.batch', | ||
73 | prog_bash, | ||
74 | args : files('tests/gm45-3d.batch.sh'), | ||
75 | workdir : meson.current_build_dir(), | ||
76 | ) | ||
77 | test( | ||
78 | 'gen5-3d.batch', | ||
79 | prog_bash, | ||
80 | args : files('tests/gen5-3d.batch.sh'), | ||
81 | workdir : meson.current_build_dir(), | ||
82 | ) | ||
83 | test( | ||
84 | 'gen6-3d.batch', | ||
85 | prog_bash, | ||
86 | args : files('tests/gen6-3d.batch.sh'), | ||
87 | workdir : meson.current_build_dir(), | ||
88 | ) | ||
89 | test( | ||
90 | 'gen7-3d.batch', | ||
91 | prog_bash, | ||
92 | args : files('tests/gen7-3d.batch.sh'), | ||
93 | workdir : meson.current_build_dir(), | ||
94 | ) | ||
95 | test( | ||
96 | 'gen7-2d-copy.batch', | ||
97 | prog_bash, | ||
98 | args : files('tests/gen7-2d-copy.batch.sh'), | ||
99 | workdir : meson.current_build_dir(), | ||
100 | ) | ||
101 | test( | ||
102 | 'intel-symbol-check', | ||
103 | prog_bash, | ||
104 | args : [files('intel-symbol-check'), libdrm_intel] | ||
105 | ) | ||