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.
74 lines
2.7 KiB
74 lines
2.7 KiB
#!/bin/bash |
|
set -ev |
|
|
|
git submodule update --init |
|
|
|
# Corrade |
|
git clone --depth 1 git://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 | xcpretty |
|
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;$TRAVIS_BUILD_DIR/sdl2" \ |
|
-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_ANYSCENEIMPORTER=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 | xcpretty |
|
# TODO: find a better way to avoid |
|
# Library not loaded: /System/Library/Frameworks/OpenGLES.framework/OpenGLES |
|
# error |
|
DYLD_FALLBACK_LIBRARY_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/OpenGLES.framework/ DYLD_FALLBACK_FRAMEWORK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks CORRADE_TEST_COLOR=ON ctest -V -C Release -E GLTest |
|
|
|
# Test install, after running the tests as for them it shouldn't be needed |
|
set -o pipefail && cmake --build . --config Release --target install | xcpretty
|
|
|