Skip to content

Commit

Permalink
Merge pull request #1219 from frelon/install-scxtop
Browse files Browse the repository at this point in the history
meson: Install rust projects in tools dir
  • Loading branch information
hodgesds authored Jan 18, 2025
2 parents 0d42833 + 3d9d462 commit de6cd29
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions meson-scripts/install_rust_user_scheds
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,22 @@ for manifest in "$MESON_SOURCE_ROOT"/rust/*/Cargo.toml; do

install -D "${bins[0]}" "${DESTDIR}/${MESON_INSTALL_PREFIX}/bin/${name}"
done

for manifest in "$MESON_SOURCE_ROOT"/tools/*/Cargo.toml; do
source_dir="${manifest%/Cargo.toml}"
target_dir="${MESON_BUILD_ROOT}"
name="${source_dir##*/}"

bins=($(ls -t "${target_dir}/"*"/${name}"))
if [ ${#bins[@]} -lt 1 ]; then
echo "Cannot find a binary for $name under $target_dir" 1>&2
exit 1
fi

# XXX - Can we detect the current buildtype and install the correct one?
if [ ${#bins[@]} -gt 1 ]; then
echo "Found multiple binaries for $name under $target_dir, installing the latest which may not be what you want" 1>&2
fi

install -D "${bins[0]}" "${DESTDIR}/${MESON_INSTALL_PREFIX}/bin/${name}"
done

0 comments on commit de6cd29

Please sign in to comment.