🚨🚨🚨 DEPRECATED 🚨🚨🚨
We now ship Google gn
as part of depot_tools with CMake during the configure step.
No manual setup is required.
gn
-- short for generate Ninja -- is Google's take on CMake.
- Install
git
. - Install
ninja
. - Install a C and C++ compiler and set
CC
andCXX
environment variables.
- Clone the repository, generate
ninja
files, and compilegn
.
$ git clone https://gn.googlesource.com/gn
$ cd gn
$ python build/gen.py
$ ninja -C out
- Make the
gn
executable available in your$PATH
, e.g.
$ cp out/gn /usr/local/bin
Make sure that standalone gn
is your default version.
(depot_tools
also includes a gn
version, and we don't want to use that.)
- Verify installation succeeded:
$ which gn
/usr/local/bin/gn
This is a condensed version of Build Google gn
build tool standalone.
You can simply install the package extra/gn
.