diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Project-templates.md | 30 | ||||
-rw-r--r-- | docs/markdown/Reference-manual.md | 5 | ||||
-rw-r--r-- | docs/markdown/index.md | 6 | ||||
-rw-r--r-- | docs/markdown/snippets/templates.md | 8 | ||||
-rw-r--r-- | docs/sitemap.txt | 1 |
5 files changed, 47 insertions, 3 deletions
diff --git a/docs/markdown/Project-templates.md b/docs/markdown/Project-templates.md new file mode 100644 index 0000000..d8459c6 --- /dev/null +++ b/docs/markdown/Project-templates.md @@ -0,0 +1,30 @@ +--- +short-description: Project templates +... + +# Project templates + +To make it easier for new developers to start working, Meson ships a +tool to generate the basic setup of different kinds of projects. This +functionality can be accessed with the `meson init` command. A typical +project setup would go like this: + +```console +$ mkdir project_name +$ cd project_name +$ 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: + +``` +$ meson builddir +$ ninja -C builddir +``` + +The generator has many different projects and settings. They can all +be listed by invoking the command `meson test --help`. + +This feature is available since Meson version 0.45.0. diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 14c931d..e30b79c 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -606,6 +606,11 @@ installed, and so on, use a [`custom_target`](#custom_target) instead. Obtains the value of the [project build option](Build-options.md) specified in the positional argument. +Note that the value returned for built-in options that end in `dir` such as +`bindir` and `libdir` is always a path relative to (and inside) the `prefix`. +The only exceptions are: `sysconfdir`, `localstatedir`, and `sharedstatedir` +which will return the value passed during configuration as-is. + ### get_variable() ``` meson diff --git a/docs/markdown/index.md b/docs/markdown/index.md index 5f42cc7..6893564 100644 --- a/docs/markdown/index.md +++ b/docs/markdown/index.md @@ -16,7 +16,7 @@ code. ## Features -* multiplatform support for Linux, OSX, Windows, GCC, Clang, Visual Studio and others +* multiplatform support for Linux, macOS, Windows, GCC, Clang, Visual Studio and others * supported languages include C, C++, D, Fortran, Java, Rust * build definitions in a very readable and user friendly non-Turing complete DSL * cross compilation for many operating systems as well as bare metal @@ -35,8 +35,8 @@ The second way is via IRC. The channel to use is `#mesonbuild` at ## Development -All development on Meson is done on [GitHub -project](https://github.com/mesonbuild/meson). Instruction on +All development on Meson is done on the [GitHub +project](https://github.com/mesonbuild/meson). Instructions for contributing can be found on the [contribution page](Contributing.md). diff --git a/docs/markdown/snippets/templates.md b/docs/markdown/snippets/templates.md new file mode 100644 index 0000000..6f0474d --- /dev/null +++ b/docs/markdown/snippets/templates.md @@ -0,0 +1,8 @@ +## Project templates + +Meson ships with predefined project templates. To start a new project from +scratch, simply go to an empty directory and type: + +```meson +meson init --name=myproject --type=executable --language=c +``` diff --git a/docs/sitemap.txt b/docs/sitemap.txt index b7ee136..87a5eb5 100644 --- a/docs/sitemap.txt +++ b/docs/sitemap.txt @@ -48,6 +48,7 @@ index.md Creating-releases.md Creating-OSX-packages.md Creating-Linux-binaries.md + Project-templates.md Reference-manual.md Reference-tables.md FAQ.md |