diff --git a/scripts/build.sh b/scripts/build.sh index 4589b2d..aaee5e7 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -230,6 +230,21 @@ done while IFS= read -r subdir; do OF_EXTRA_INCLUDES="$OF_EXTRA_INCLUDES -I$subdir" done < <(find "$ADDON_DIR/src" -type d) +# Bundled OF addons that ofxPiMapper depends on (e.g. ofxXmlSettings, ofxOsc, ...) +# Read the list from addons.make if present, otherwise include all bundled addon src dirs. +ADDONS_MAKE="$ADDON_DIR/example_basic/addons.make" +if [ -f "$ADDONS_MAKE" ]; then + while IFS= read -r addon_name; do + addon_name="${addon_name%%#*}" # strip comments + addon_name="$(echo "$addon_name" | tr -d '[:space:]')" + [ -z "$addon_name" ] && continue + addon_src="$OF_DIR/addons/$addon_name/src" + [ -d "$addon_src" ] || continue + while IFS= read -r subdir; do + OF_EXTRA_INCLUDES="$OF_EXTRA_INCLUDES -I$subdir" + done < <(find "$addon_src" -type d) + done < "$ADDONS_MAKE" +fi make clean 2>/dev/null || true make -j1 \