Live video on the AT Protocol

iroh: add dynamic library to `make dev`

+36 -19
+1
Makefile
··· 77 77 .PHONY: dev 78 78 dev: 79 79 cp ./util/streamplace-dev.sh $(BUILDDIR)/streamplace 80 + cargo build 80 81 PKG_CONFIG_PATH=$(SHARED_PKG_CONFIG_PATH) \ 81 82 LD_LIBRARY_PATH=$(SHARED_LD_LIBRARY_PATH) \ 82 83 DYLD_LIBRARY_PATH=$(SHARED_DYLD_LIBRARY_PATH) \
+34 -18
rust/iroh-streamplace/meson.build
··· 1 1 prog_cargo = find_program('cargo') 2 2 3 - cargo_cmd = '@0@ build --release --target-dir "@1@"'.format(prog_cargo.full_path(), meson.current_build_dir()) 4 - archive_dir = meson.current_build_dir() 3 + if get_option('default_library') == 'shared' 4 + cargo_cmd = '@0@ build'.format(prog_cargo.full_path()) 5 5 6 - triple = meson.get_external_property('RUST_TRIPLE', '') 7 - if triple != '' 8 - cargo_cmd += ' --target @0@'.format(triple) 9 - archive_dir += '/' + triple 10 - endif 6 + iroh_streamplace_dep = custom_target( 7 + 'libiroh_streamplace', 8 + input: [], 9 + output: ['libiroh_streamplace.so'], 10 + command: [ 11 + 'sh', 12 + '-c', 13 + 'cd "@2@/../.." && @0@ && cp "@2@/../../target/debug/libiroh_streamplace.so" "@1@/libiroh_streamplace.so"'.format(cargo_cmd, meson.current_build_dir(), meson.current_source_dir()), 14 + ], 15 + build_by_default: true, 16 + ) 17 + else 18 + cargo_cmd = '@0@ build --release --target-dir "@1@"'.format(prog_cargo.full_path(), meson.current_build_dir()) 19 + archive_dir = meson.current_build_dir() 11 20 12 - iroh_streamplace_dep = custom_target( 13 - 'libiroh_streamplace', 14 - input: [], 15 - output: ['libiroh_streamplace.a'], 16 - command: [ 17 - 'sh', 18 - '-c', 19 - '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), 20 - ], 21 - build_by_default: true, 22 - ) 21 + triple = meson.get_external_property('RUST_TRIPLE', '') 22 + if triple != '' 23 + cargo_cmd += ' --target @0@'.format(triple) 24 + archive_dir += '/' + triple 25 + endif 26 + 27 + iroh_streamplace_dep = custom_target( 28 + 'libiroh_streamplace', 29 + input: [], 30 + output: ['libiroh_streamplace.a'], 31 + command: [ 32 + 'sh', 33 + '-c', 34 + '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), 35 + ], 36 + build_by_default: true, 37 + ) 38 + endif
+1 -1
util/streamplace-dev.sh
··· 7 7 8 8 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) 9 9 STREAMPLACE_DEV_VERSION=$(go run ./pkg/config/git/git.go -v) \ 10 - LD_LIBRARY_PATH="$SCRIPT_DIR/lib/usr/local/lib/x86_64-linux-gnu" \ 10 + LD_LIBRARY_PATH="$SCRIPT_DIR/lib/usr/local/lib/x86_64-linux-gnu:$SCRIPT_DIR/../target/debug" \ 11 11 DYLD_LIBRARY_PATH="$SCRIPT_DIR/lib/usr/local/lib" \ 12 12 SP_DEV_FRONTEND_PROXY="http://127.0.0.1:38081" \ 13 13 exec "$SCRIPT_DIR/libstreamplace" "$@"