Skip to content

Instantly share code, notes, and snippets.

@kbingham
Created June 9, 2020 11:19
Show Gist options
  • Save kbingham/24a43dc12b419b8dacb7f518edea9a68 to your computer and use it in GitHub Desktop.
Save kbingham/24a43dc12b419b8dacb7f518edea9a68 to your computer and use it in GitHub Desktop.
Multiple build script for libcamera
#!/bin/bash
# Stop on errors
set -e
function build() {
echo "Building for $1"
export BUILDDIR=build-$1
export CC=$2
export CXX=$3
if [ ! -d $BUILDDIR ]; then
meson $BUILDDIR \
-Dv4l2=true \
-Dandroid=true \
-Ddocumentation=false \
-Dgstreamer=enabled
fi
ninja -j8 -C $BUILDDIR
}
configurations=" \
gcc-8:gcc-8:g++-8 \
gcc-9:gcc-9:g++-9 \
clang-7:clang-7:clang++-7 \
clang-8:clang-8:clang++-8 \
clang-9:clang-9:clang++-9 \
"
for conf in ${configurations}
do
parsed=(${conf//:/ })
build ${parsed[@]}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment