mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-03 06:39:39 +00:00
cross-compile
This commit is contained in:
parent
a1117c58ac
commit
652e210bfb
2 changed files with 27 additions and 5 deletions
|
@ -29,6 +29,7 @@ cd "build-$HOST"
|
||||||
|
|
||||||
params=(
|
params=(
|
||||||
--prefix="$INSTALL_DIR"
|
--prefix="$INSTALL_DIR"
|
||||||
|
--arch="$ARCH"
|
||||||
--disable-autodetect
|
--disable-autodetect
|
||||||
--disable-programs
|
--disable-programs
|
||||||
--disable-everything
|
--disable-everything
|
||||||
|
@ -44,10 +45,19 @@ params=(
|
||||||
--enable-muxer=mp4
|
--enable-muxer=mp4
|
||||||
--enable-muxer=matroska
|
--enable-muxer=matroska
|
||||||
)
|
)
|
||||||
if [[ "$HOST_SYSTEM" == 'linux' ]]
|
|
||||||
then
|
case "$HOST_SYSTEM" in
|
||||||
|
linux)
|
||||||
params+=(--enable-libv4l2)
|
params+=(--enable-libv4l2)
|
||||||
fi
|
;;
|
||||||
|
windows)
|
||||||
|
params+=(--target-os=mingw32)
|
||||||
|
params+=(--cross-prefix="$HOST-")
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
fail "Unsupported platform: $HOST"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
../configure "${params[@]}"
|
../configure "${params[@]}"
|
||||||
make -j $NJOBS
|
make -j $NJOBS
|
||||||
|
|
|
@ -10,7 +10,19 @@ fail() {
|
||||||
}
|
}
|
||||||
|
|
||||||
[[ -z "$HOST" ]] && fail '$HOST not defined'
|
[[ -z "$HOST" ]] && fail '$HOST not defined'
|
||||||
[[ -z "$HOST_SYSTEM" ]] && fail '$HOST_SYSTEM not defined'
|
|
||||||
|
if [[ "$HOST" == *linux* ]]
|
||||||
|
then
|
||||||
|
HOST_SYSTEM='linux'
|
||||||
|
elif [[ "$HOST" == *mingw* ]]
|
||||||
|
then
|
||||||
|
HOST_SYSTEM='windows'
|
||||||
|
else
|
||||||
|
fail "Host system could not be deduced from '$HOST'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ARCH="${HOST%%-*}"
|
||||||
|
[[ -z "$ARCH" ]] && fail "Arch could not be deduced from '$HOST'"
|
||||||
|
|
||||||
DIR=$(dirname ${BASH_SOURCE[0]})
|
DIR=$(dirname ${BASH_SOURCE[0]})
|
||||||
cd "$DIR"
|
cd "$DIR"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue