2021-02-12 19:15:39 +01:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2022-12-02 11:40:55 +01:00
|
|
|
. scripts/sdk.sh
|
|
|
|
mkdir -p deps; cd deps
|
2021-02-12 19:15:39 +01:00
|
|
|
|
|
|
|
[ ! -d irrlicht-src ] && \
|
2022-09-01 23:26:24 +02:00
|
|
|
git clone --depth 1 -b SDL2 https://github.com/MoNTE48/Irrlicht irrlicht-src
|
2021-02-12 19:15:39 +01:00
|
|
|
|
2022-09-25 12:10:27 +02:00
|
|
|
rm -rf irrlicht
|
|
|
|
|
2021-02-12 19:15:39 +01:00
|
|
|
cd irrlicht-src/source/Irrlicht
|
2022-09-25 12:10:27 +02:00
|
|
|
|
2021-02-12 19:15:39 +01:00
|
|
|
xcodebuild build \
|
|
|
|
ARCHS="$OSX_ARCHES" \
|
2022-09-25 12:10:27 +02:00
|
|
|
OTHER_CFLAGS="-I../../../libpng/include -I../../../libjpeg/include" \
|
2021-02-12 19:15:39 +01:00
|
|
|
-project Irrlicht.xcodeproj \
|
|
|
|
-configuration Release \
|
|
|
|
-scheme Irrlicht_OSX
|
|
|
|
|
|
|
|
BUILD_FOLDER=$(xcodebuild -project Irrlicht.xcodeproj -scheme \
|
|
|
|
Irrlicht_OSX -showBuildSettings | \
|
|
|
|
grep TARGET_BUILD_DIR | sed -n -e 's/^.*TARGET_BUILD_DIR = //p')
|
|
|
|
|
|
|
|
cd ../..
|
|
|
|
|
|
|
|
[ -d ../irrlicht ] && rm -r ../irrlicht
|
|
|
|
mkdir -p ../irrlicht
|
2022-11-13 17:35:33 +01:00
|
|
|
cp -v "${BUILD_FOLDER}/libIrrlicht.a" ../irrlicht
|
|
|
|
cp -rv include ../irrlicht/include
|
2021-02-12 19:15:39 +01:00
|
|
|
|
|
|
|
echo "Irrlicht build successful"
|