Skip to content

Commit

Permalink
update Project-templates.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer-coding authored and jpakkane committed Jun 17, 2020
1 parent 07d2331 commit f7b7514
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions docs/markdown/Project-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,30 @@ project. The result can be compiled as usual. For example compiling it
with Ninja could be done like this:

```
$ meson builddir
$ ninja -C builddir
$ meson setup builddir
$ meson compile -C builddir
```

The generator has many different projects and settings. They can all
be listed by invoking the command `meson init --help`.

This feature is available since Meson version 0.45.0.

# Generate a build script for an existing project

With `meson init` you can generate a build script for an existing
project with existing project files by running the command in the
root directory of your project. Meson currently supports this
feature for `executable`, and `jar` projects.

# Build after generation of template

It is possible to have Meson generate a build directory from the
`meson init` command without running `meson setup`. This is done
by passing `-b` or `--build` switch.

```console
$ mkdir project_name
$ cd project_name
$ meson init --language=c --name=myproject --version=0.1 --build
```

0 comments on commit f7b7514

Please sign in to comment.