Created
December 13, 2021 19:41
-
-
Save darksylinc/301ce95b365b11e7247e3d5fb6ea55ce to your computer and use it in GitHub Desktop.
Build script for Ogre 2.1 on macOS (first `brew instal sdl2`)
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
#!/bin/bash | |
OGRE_BRANCH_NAME="v2-1" | |
if test ! -d ogre-next-deps; then | |
mkdir ogre-next-deps | |
echo "--- Cloning ogre-next-deps ---" | |
git clone --recurse-submodules --shallow-submodules https://github.com/OGRECave/ogre-next-deps || exit $? | |
else | |
echo "--- ogre-next-deps repo detected. Cloning skipped ---" | |
fi | |
cd ogre-next-deps | |
mkdir build | |
cd build | |
echo "--- Building ogre-next-deps ---" | |
cmake -G Xcode .. || exit $? | |
cmake --build . --target install --config Debug || exit $? | |
cmake --build . --target install --config RelWithDebInfo || exit $? | |
cd ../../ | |
if test ! -d Ogre; then | |
echo "--- Cloning Ogre master ---" | |
git clone https://github.com/OGRECave/ogre-next Ogre || exit $? | |
cd Ogre | |
git checkout ${OGRE_BRANCH_NAME} || exit $? | |
cd ../ | |
fi | |
cd Ogre | |
if test ! -L Dependencies; then | |
ln -s ../ogre-next-deps/build/ogredeps Dependencies | |
fi | |
mkdir -p build | |
cd build | |
echo "--- Configuring Ogre ---" | |
cmake -D OGRE_USE_BOOST=0-D OGRE_CONFIG_THREAD_PROVIDER=0 \ | |
-D OGRE_CONFIG_THREADS=0 \ | |
-D OGRE_BUILD_COMPONENT_SCENE_FORMAT=0 \ | |
-D OGRE_BUILD_SAMPLES2=1 \ | |
-D OGRE_BUILD_TESTS=0 \ | |
-D OGRE_BUILD_RENDERSYSTEM_GL3PLUS=1 \ | |
-D OGRE_BUILD_LIBS_AS_FRAMEWORKS=0 \ | |
-G Xcode ../ || exit $? | |
echo "--- Building Ogre (Debug) ---" | |
cmake --build . --target ALL_BUILD --config Debug || exit $? | |
echo "--- Building Ogre (Release) ---" | |
cmake --build . --target ALL_BUILD --config RelWithDebInfo || exit $? | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment