Skip to content

Commit 1f971f3

Browse files
committed
scons: add support for using SDL built with ndk-build for android builds
1 parent 4ad11b3 commit 1f971f3

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

packaging/android/build-android-dependencies/build-android-deps.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ do
7272

7373
if [[ $package == *"SDL3"* ]]
7474
then
75-
mkdir build
76-
cmake -S . -B ./build
77-
cmake --build build
78-
cmake --install build
79-
8075
if [ -f android-project/app/jni/Android.mk ]
8176
then
8277
mkdir -p ../SDL3-ndk-build/jni
@@ -187,6 +182,10 @@ do
187182
popd
188183
continue
189184
fi
185+
if [[ $package == *"SDL3"* ]]
186+
then
187+
cp -r $src_dir/include/* $PREFIXDIR/$abi/include/
188+
fi
190189
done
191190
done
192191

@@ -195,7 +194,7 @@ cd $BUILDDIR/src/SDL3-ndk-build
195194
webpPath=($BUILDDIR/src/libwebp-*)
196195
sdl_imagePath=($BUILDDIR/src/SDL3_image-*)
197196
ln -sf $webpPath $sdl_imagePath/external/libwebp
198-
$NDK/ndk-build SUPPORT_WEBP=true APP_ABI="$ARCHS"
197+
$NDK/ndk-build SUPPORT_WEBP=true SUPPORT_WAVPACK=false SUPPORT_SAVE_WEBP=false APP_ABI="$ARCHS"
199198
for lib in libs/*/*.so
200199
do
201200
instdir=$(basename $(dirname $lib))

scons/sdl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ def CheckSDL3(context, require_version):
2323
if env["PLATFORM"] != "win32" or sys.platform == "msys":
2424
for foo_config in [
2525
"pkg-config --cflags --libs $PKG_CONFIG_FLAGS sdl3",
26-
"sdl3-config --cflags --libs"
26+
"sdl3-config --cflags --libs",
27+
"echo -lSDL3"
2728
]:
2829
try:
2930
env.ParseConfig(foo_config)

0 commit comments

Comments
 (0)