Use ninja if available to build dependencies

If the ninja build system is installed, ask CMake to generate Ninja build files and use
it for the build.
This commit is contained in:
Vincent Duvert 2018-04-04 20:48:21 +02:00
parent 9c8117efe6
commit 9a3ab266d1
2 changed files with 11 additions and 2 deletions

View File

@ -75,6 +75,10 @@ open-source libraries on which **MoltenVK** relies:
brew install cmake
brew install python3
For faster dependencies build, you can also install Ninja:
brew install ninja
2. Clone the `MoltenVK` repository:
git clone https://github.com/KhronosGroup/MoltenVK.git

View File

@ -48,8 +48,13 @@ build_repo() {
mkdir -p $1/build
cd $1/build
cmake ..
make
if type ninja >/dev/null 2>&1 ; then
cmake .. -G Ninja
ninja
else
cmake ..
make
fi
cd -
}