Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
1.6 kB · 50 lines
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051prog_cargo = find_program('cargo')if get_option('default_library') == 'shared' cargo_cmd = '@0@ build'.format(prog_cargo.full_path()) if host_machine.system() == 'darwin' ext = 'dylib' elif host_machine.system() == 'linux' ext = 'so' else error('Unsupported dev system: @0@'.format(host_machine.system())) endif iroh_streamplace_dep = custom_target( 'libiroh_streamplace', input: [], output: ['libiroh_streamplace.' + ext], command: [ 'sh', '-c', 'cd "@2@/../.." && @0@ && cp "@2@/../../target/debug/libiroh_streamplace.@3@" "@1@/libiroh_streamplace.@3@"'.format(cargo_cmd, meson.current_build_dir(), meson.current_source_dir(), ext), ], build_by_default: true, install: true, install_dir: get_option('libdir'), )else cargo_cmd = '@0@ build --release --target-dir "@1@"'.format(prog_cargo.full_path(), meson.current_build_dir()) archive_dir = meson.current_build_dir() triple = meson.get_external_property('RUST_TRIPLE', '') if triple != '' cargo_cmd += ' --target @0@'.format(triple) archive_dir += '/' + triple endif iroh_streamplace_dep = custom_target( 'libiroh_streamplace', input: [], output: ['libiroh_streamplace.a'], command: [ 'sh', '-c', 'cd "@2@" && @0@ && cp "@3@/release/libiroh_streamplace.a" "@1@/libiroh_streamplace.a"'.format(cargo_cmd, meson.current_build_dir(), meson.current_source_dir(), archive_dir), ], build_by_default: true, install: true, install_dir: get_option('libdir'), )endif