fix: explicitly link bundled OF static libs (tess2, kiss) via USER_LDFLAGS
This commit is contained in:
@ -266,6 +266,21 @@ if [ -f "$ADDONS_MAKE" ]; then
|
||||
done < "$ADDONS_MAKE"
|
||||
fi
|
||||
|
||||
# Collect bundled static libs from OF's libs/*/lib/linuxaarch64/*.a
|
||||
# The Makefile's auto-discovery skips these in cross-compile mode, so
|
||||
# we add them explicitly via USER_LDFLAGS.
|
||||
BUNDLED_LDFLAGS=""
|
||||
for lib in "$OF_DIR/libs"/*/; do
|
||||
libname=$(basename "$lib")
|
||||
[ "$libname" = "openFrameworks" ] && continue
|
||||
[ "$libname" = "openFrameworksCompiled" ] && continue
|
||||
libdir="${lib}lib/linuxaarch64"
|
||||
[ -d "$libdir" ] || continue
|
||||
for a in "$libdir"/*.a; do
|
||||
[ -f "$a" ] && BUNDLED_LDFLAGS="$BUNDLED_LDFLAGS $a"
|
||||
done
|
||||
done
|
||||
|
||||
make clean 2>/dev/null || true
|
||||
make -j1 \
|
||||
PKG_CONFIG="$PKGCFG_WRAPPER" \
|
||||
@ -280,6 +295,7 @@ make -j1 \
|
||||
PLATFORM_CFLAGS="$GLOBAL_FLAGS $OF_EXTRA_INCLUDES -I$ADDON_DIR/src" \
|
||||
USER_CFLAGS="$GLOBAL_FLAGS" \
|
||||
USER_CPPFLAGS="-std=c++11" \
|
||||
USER_LDFLAGS="$BUNDLED_LDFLAGS" \
|
||||
OF_PROJECT_OPTIMIZATION_FLAGS="-O0"
|
||||
|
||||
# ── 6. Collect artifacts ─────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user