Skip to content

Commit 3e18e3d

Browse files
meson: install headers (#394)
Signed-off-by: Amneesh Singh <[email protected]> Co-authored-by: Almar Klein <[email protected]>
1 parent 71bc33b commit 3e18e3d

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

ffi/meson.build

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
inc_dirs += [include_directories('.', is_system: true)]
2+
3+
headers = files(
4+
'wgpu.h',
5+
'webgpu-headers/webgpu.h'
6+
)
7+
8+
install_headers(headers, preserve_path: true)

meson.build

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

22
project('wgpu-native', 'c', version : '0.0.0', license : 'MIT OR Apache-2.0')
33

4-
inc_dirs = [include_directories('ffi', is_system: true)]
4+
inc_dirs = [ ]
5+
6+
subdir('ffi')
57

68
cargo = find_program('cargo')
79
#determine which dir contain platform library
@@ -12,7 +14,7 @@ else
1214
endif
1315

1416
#build by cargo
15-
run_command(cargo,'build','--release')
17+
run_command(cargo,'build','--release', check: true)
1618
#mark cargo artifact to static library
1719
wgpu_native = static_library('wgpu_native', objects : lib_path, install : true)
1820

@@ -27,4 +29,3 @@ pkg.generate(name : 'wgpu-native',
2729
libraries : [wgpu_native],
2830
version : meson.project_version(),
2931
)
30-
install_subdir('include', install_dir : '')

0 commit comments

Comments
 (0)