diff --git a/recipes/sdl3/build.sh b/recipes/sdl3/build.sh index 2e12d0647724c..700cb2ac18a0b 100644 --- a/recipes/sdl3/build.sh +++ b/recipes/sdl3/build.sh @@ -1,5 +1,17 @@ #!/bin/sh +if [[ ${HOST} =~ .*darwin.* ]]; then + export CFLAGS="${CFLAGS} -isysroot ${SDKROOT:-$CONDA_BUILD_SYSROOT}" + + if [[ "${target_platform}" == "osx-arm64" ]]; then + export ADDITIONAL_OPTIONS="-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.3" + fi + + if [[ "${target_platform}" == "osx-x86_64" ]]; then + export ADDITIONAL_OPTIONS="-DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13" + fi +fi + mkdir build cd build @@ -15,8 +27,7 @@ cmake .. \ -DSDL_HIDAPI=OFF \ -DSDL_POWER=OFF \ -DSDL_SENSOR=OFF \ - -DSDL_DIALOG=OFF \ - -DSDL_COCOA=OFF + -DSDL_DIALOG=OFF make make install