diff options
author | John Ericson <git@JohnEricson.me> | 2020-08-03 11:48:27 -0400 |
---|---|---|
committer | John Ericson <git@JohnEricson.me> | 2020-08-03 11:48:27 -0400 |
commit | eaf6343c065842b9719793066e765b2e5f1c2f3b (patch) | |
tree | 1bfeac5297ba489721e704e63c28f33d0fb98990 /docs/markdown/Project-templates.md | |
parent | 87aa98c1787d800145853a8e84654e4c54ee1078 (diff) | |
parent | 70edf82c6c77902cd64f44848302bbac92d611d8 (diff) | |
download | meson-lang-enum.zip meson-lang-enum.tar.gz meson-lang-enum.tar.bz2 |
Merge remote-tracking branch 'upstream/master' into lang-enumlang-enum
Diffstat (limited to 'docs/markdown/Project-templates.md')
-rw-r--r-- | docs/markdown/Project-templates.md | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/docs/markdown/Project-templates.md b/docs/markdown/Project-templates.md index 5f323bd..7ded318 100644 --- a/docs/markdown/Project-templates.md +++ b/docs/markdown/Project-templates.md @@ -16,15 +16,34 @@ $ meson init --language=c --name=myproject --version=0.1 ``` This would create the build definitions for a helloworld type -project. The result can be compiled as usual. For example compiling it -with Ninja could be done like this: +project. The result can be compiled as usual. For example it +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 +```
\ No newline at end of file |