mirror of https://github.com/mosra/magnum.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
3.2 KiB
89 lines
3.2 KiB
|
4 years ago
|
#!/bin/bash
|
||
|
|
set -ev
|
||
|
|
|
||
|
|
git submodule update --init
|
||
|
|
|
||
|
|
# Corrade
|
||
|
|
git clone --depth 1 https://github.com/mosra/corrade.git
|
||
|
|
cd corrade
|
||
|
|
|
||
|
|
# Build native corrade-rc
|
||
|
|
mkdir build && cd build
|
||
|
|
cmake .. \
|
||
|
|
-DCMAKE_BUILD_TYPE=Release \
|
||
|
|
-DCMAKE_INSTALL_PREFIX=$HOME/deps-native \
|
||
|
|
-DWITH_INTERCONNECT=OFF \
|
||
|
|
-DWITH_PLUGINMANAGER=OFF \
|
||
|
|
-DWITH_TESTSUITE=OFF \
|
||
|
|
-DWITH_UTILITY=OFF \
|
||
|
|
-G Ninja
|
||
|
|
ninja install
|
||
|
|
cd ..
|
||
|
|
|
||
|
|
# Crosscompile Corrade
|
||
|
|
mkdir build-ios && cd build-ios
|
||
|
|
cmake .. \
|
||
|
|
-DCMAKE_TOOLCHAIN_FILE=../../toolchains/generic/iOS.cmake \
|
||
|
|
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk \
|
||
|
|
-DCMAKE_OSX_ARCHITECTURES="x86_64" \
|
||
|
|
-DCORRADE_RC_EXECUTABLE=$HOME/deps-native/bin/corrade-rc \
|
||
|
|
-DCMAKE_INSTALL_PREFIX=$HOME/deps \
|
||
|
|
-DBUILD_STATIC=ON \
|
||
|
|
-DTESTSUITE_TARGET_XCTEST=ON \
|
||
|
|
-DWITH_INTERCONNECT=OFF \
|
||
|
|
-G Xcode
|
||
|
|
set -o pipefail && cmake --build . --config Release --target install | xcbeautify
|
||
|
|
cd ../..
|
||
|
|
|
||
|
|
# Crosscompile SDL. On 2022-14-02 curl says the certificate is expired, so
|
||
|
|
# ignore that.
|
||
|
|
# TODO use a CMake build instead
|
||
|
|
curl --insecure -O https://www.libsdl.org/release/SDL2-2.0.10.tar.gz
|
||
|
|
tar -xzvf SDL2-2.0.10.tar.gz
|
||
|
|
cd SDL2-2.0.10/Xcode-iOS/SDL
|
||
|
|
set -o pipefail && xcodebuild -sdk iphonesimulator13.4 | xcbeautify
|
||
|
|
cp build/Release-iphonesimulator/libSDL2.a $HOME/deps/lib
|
||
|
|
mkdir -p $HOME/deps/include/SDL2
|
||
|
|
cp -R ../../include/* $HOME/deps/include/SDL2
|
||
|
|
cd ../../..
|
||
|
|
|
||
|
|
# Crosscompile Magnum
|
||
|
|
mkdir build-ios && cd build-ios
|
||
|
|
cmake .. \
|
||
|
|
-DCMAKE_TOOLCHAIN_FILE=../toolchains/generic/iOS.cmake \
|
||
|
|
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk \
|
||
|
|
-DCMAKE_OSX_ARCHITECTURES="x86_64" \
|
||
|
|
-DCORRADE_RC_EXECUTABLE=$HOME/deps-native/bin/corrade-rc \
|
||
|
|
-DCMAKE_PREFIX_PATH="$HOME/deps" \
|
||
|
|
-DTARGET_GLES2=$TARGET_GLES2 \
|
||
|
|
-DWITH_AUDIO=ON \
|
||
|
|
-DWITH_VK=OFF \
|
||
|
|
-DWITH_SDL2APPLICATION=ON \
|
||
|
|
-DWITH_WINDOWLESSIOSAPPLICATION=ON \
|
||
|
|
-DWITH_EGLCONTEXT=ON \
|
||
|
|
-DWITH_OPENGLTESTER=ON \
|
||
|
|
-DWITH_ANYAUDIOIMPORTER=ON \
|
||
|
|
-DWITH_ANYIMAGECONVERTER=ON \
|
||
|
|
-DWITH_ANYIMAGEIMPORTER=ON \
|
||
|
|
-DWITH_ANYSCENECONVERTER=ON \
|
||
|
|
-DWITH_ANYSCENEIMPORTER=ON \
|
||
|
|
-DWITH_ANYSHADERCONVERTER=ON \
|
||
|
|
-DWITH_MAGNUMFONT=ON \
|
||
|
|
-DWITH_MAGNUMFONTCONVERTER=ON \
|
||
|
|
-DWITH_OBJIMPORTER=ON \
|
||
|
|
-DWITH_TGAIMAGECONVERTER=ON \
|
||
|
|
-DWITH_TGAIMPORTER=ON \
|
||
|
|
-DWITH_WAVAUDIOIMPORTER=ON \
|
||
|
|
-DBUILD_STATIC=ON \
|
||
|
|
-DBUILD_TESTS=ON \
|
||
|
|
-DBUILD_GL_TESTS=ON \
|
||
|
|
-G Xcode
|
||
|
|
set -o pipefail && cmake --build . --config Release | xcbeautify
|
||
|
|
# TODO: find a better way to avoid
|
||
|
|
# Library not loaded: /System/Library/Frameworks/OpenGLES.framework/OpenGLES
|
||
|
|
# error
|
||
|
|
DYLD_FALLBACK_LIBRARY_PATH="/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 12.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/OpenGLES.framework" DYLD_FALLBACK_FRAMEWORK_PATH="/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 12.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks" CORRADE_TEST_COLOR=ON ctest -V -C Release -E "GLTest|GLBenchmark"
|
||
|
|
|
||
|
|
# Test install, after running the tests as for them it shouldn't be needed
|
||
|
|
set -o pipefail && cmake --build . --config Release --target install | xcbeautify
|