Skip to content

Commit

Permalink
meson: install headers (#394)
Browse files Browse the repository at this point in the history
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
Co-authored-by: Almar Klein <almar@almarklein.org>
  • Loading branch information
natto1784 and almarklein authored Aug 29, 2024
1 parent 71bc33b commit 3e18e3d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions ffi/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
inc_dirs += [include_directories('.', is_system: true)]

headers = files(
'wgpu.h',
'webgpu-headers/webgpu.h'
)

install_headers(headers, preserve_path: true)
7 changes: 4 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

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

inc_dirs = [include_directories('ffi', is_system: true)]
inc_dirs = [ ]

subdir('ffi')

cargo = find_program('cargo')
#determine which dir contain platform library
Expand All @@ -12,7 +14,7 @@ else
endif

#build by cargo
run_command(cargo,'build','--release')
run_command(cargo,'build','--release', check: true)
#mark cargo artifact to static library
wgpu_native = static_library('wgpu_native', objects : lib_path, install : true)

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

0 comments on commit 3e18e3d

Please sign in to comment.