build: also look for ninja-build in addition to ninja

The ninja binary may have other names on Linux distributions. On Fedora
it's ninja-build.
This commit is contained in:
Lucas De Marchi 2016-12-21 15:44:58 -08:00 committed by Lorenz Meier
parent 54ab5cde2f
commit 03c3ea0040
1 changed files with 10 additions and 2 deletions

View File

@ -88,12 +88,20 @@ FIRST_ARG := $(firstword $(MAKECMDGOALS))
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
j ?= 4
NINJA_BIN := ninja
ifndef NO_NINJA_BUILD
NINJA_BUILD := $(shell ninja --version 2>/dev/null)
NINJA_BUILD := $(shell $(NINJA_BIN) --version 2>/dev/null)
ifndef NINJA_BUILD
NINJA_BIN := ninja-build
NINJA_BUILD := $(shell $(NINJA_BIN) --version 2>/dev/null)
endif
endif
ifdef NINJA_BUILD
PX4_CMAKE_GENERATOR ?= "Ninja"
PX4_MAKE = ninja
PX4_MAKE = $(NINJA_BIN)
PX4_MAKE_ARGS =
else