Created
June 9, 2020 11:19
-
-
Save kbingham/24a43dc12b419b8dacb7f518edea9a68 to your computer and use it in GitHub Desktop.
Multiple build script for libcamera
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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