Skip to content

Instantly share code, notes, and snippets.

@Kojirion
Last active May 26, 2016 22:23
Show Gist options
  • Save Kojirion/e3c3cc63a8776a5eb0f5 to your computer and use it in GitHub Desktop.
Save Kojirion/e3c3cc63a8776a5eb0f5 to your computer and use it in GitHub Desktop.
Bash script to build master branch of SFML, SFGUI and Thor libraries
function Build {
local buildType="$1"
mkdir -p $buildType/install
cd $buildType
cmake -DCMAKE_BUILD_TYPE=$buildType -DCMAKE_MODULE_PATH=$(pwd)../../../SFML/cmake/Modules/ -DSFML_ROOT=$(pwd)/../../../SFML/Builds/$buildType/install -DCMAKE_INSTALL_PREFIX=$(pwd)/install -DCMAKE_CXX_FLAGS=-std=c++14 ../..
make -j6 install
cd ..
}
function CloneAndBuild {
local library="$1" repository="$2"
git clone --depth=1 $repository
mkdir -p $library/Builds
cd $library/Builds
Build Debug
Build Release
Build RelWithDebInfo
cd ../..
}
CloneAndBuild SFML https://github.com/LaurentGomila/SFML.git
CloneAndBuild SFGUI https://github.com/TankOs/SFGUI.git
CloneAndBuild Thor https://github.com/Bromeon/Thor.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment