Don't force enable QPG6100 in gn_build.sh (#3396)
This doesn't build on the Pi right now since we aren't fetching ARM GCC
on the platform yet (and the Ubuntu arm-none-gcc doesn't seem to have 64
bit integer formatting for printf, breaking the build).
Instead accept GN args on the command line of this script and print a
hint about how to enable it.
diff --git a/gn_build.sh b/gn_build.sh
index 36730c5..6283a9d 100755
--- a/gn_build.sh
+++ b/gn_build.sh
@@ -72,7 +72,16 @@
echo gn args "$CHIP_ROOT/out/custom"
echo ninja -C "$CHIP_ROOT/out/custom"
-extra_args=" enable_qpg6100_builds=true"
+extra_args=""
+
+for arg; do
+ case $arg in
+ enable_qpg6100_builds=true)
+ qpg6100_enabled=1
+ ;;
+ esac
+ extra_args+=" $arg"
+done
# Android SDK setup
android_sdk_args=""
@@ -131,6 +140,13 @@
fi
echo
+if [[ -z "$qpg6100_enabled" ]]; then
+ echo "Hint: Pass enable_qpg6100_builds=true to this script to enable building for QPG6100"
+else
+ echo 'To build the QPG6100 lock sample as a standalone project:'
+ echo "(cd $CHIP_ROOT/examples/lock-app/qpg6100; gn gen out/debug; ninja -C out/debug)"
+fi
+
echo
_chip_banner "Build: GN configure"