aboutsummaryrefslogtreecommitdiffstats
path: root/meson/docs/markdown/Project-templates.md
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/docs/markdown/Project-templates.md
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/docs/markdown/Project-templates.md')
-rw-r--r--meson/docs/markdown/Project-templates.md49
1 files changed, 49 insertions, 0 deletions
diff --git a/meson/docs/markdown/Project-templates.md b/meson/docs/markdown/Project-templates.md
new file mode 100644
index 000000000..7ded318b7
--- /dev/null
+++ b/meson/docs/markdown/Project-templates.md
@@ -0,0 +1,49 @@
+---
+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 it
+could be done like this:
+
+```
+$ 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