Skip to content

Commit

Permalink
Clean osxs builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ymontmarin committed Feb 11, 2025
1 parent 4c09299 commit 2c94ca3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
25 changes: 10 additions & 15 deletions recipes/sdl3/build.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#!/bin/sh

if [[ ${HOST} =~ .*darwin.* ]]; then
export CFLAGS="${CFLAGS} -isysroot ${SDKROOT:-$CONDA_BUILD_SYSROOT}"
# Adapt cflags for the sdk in use
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
# Additional build option depending on target architecture
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
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
Expand All @@ -20,14 +22,7 @@ cmake .. \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
-DSDL_AUDIO=OFF \
-DSDL_CAMERA=OFF \
-DSDL_JOYSTICK=OFF \
-DSDL_HAPTIC=OFF \
-DSDL_HIDAPI=OFF \
-DSDL_POWER=OFF \
-DSDL_SENSOR=OFF \
-DSDL_DIALOG=OFF
$ADDITIONAL_OPTIONS

make
make install
5 changes: 3 additions & 2 deletions recipes/sdl3/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Both arm and x86_64 need 11.3 to build
MACOSX_SDK_VERSION: # [osx]
- "11.3" # [osx and arm64]
- "11.3" # [osx and x86_64]
- "11.3" # [osx]

0 comments on commit 2c94ca3

Please sign in to comment.