-
Notifications
You must be signed in to change notification settings - Fork 442
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I don't think GLES2 is worth bothering with on this platform, given that GL as a whole is deprecated by that company.
- Loading branch information
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#!/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 |