Skip to content

Commit e305465

Browse files
obiwacalmarklein
andauthored
meson: Install Cargo-generated lib directly (#450)
Co-authored-by: Almar Klein <[email protected]>
1 parent cf7fc46 commit e305465

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

meson.build

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,15 @@ else
1313
lib_path='target/release/wgpu_native.lib'
1414
endif
1515

16-
#build by cargo
16+
#build with cargo
1717
run_command(cargo,'build','--release', check: true)
18-
#mark cargo artifact to static library
19-
wgpu_native = static_library('wgpu_native', objects : lib_path, install : true)
2018

21-
dep_wgpu_native = declare_dependency(
22-
link_with:wgpu_native,
23-
include_directories: inc_dirs
24-
)
19+
#mark cargo artifact for installation
20+
install_data(lib_path, install_dir : get_option('libdir'))
2521

2622
pkg = import('pkgconfig')
2723
pkg.generate(name : 'wgpu-native',
2824
description : 'Headers for using wgpu-native',
29-
libraries : [wgpu_native],
25+
libraries : ['-L${libdir}', '-lwgpu_native'],
3026
version : meson.project_version(),
3127
)

0 commit comments

Comments
 (0)