The Meson Build System
Tutorial
To create a Meson build definition for a simple project.It assumes that you have GTK development environment installed:
sudo apt install libgtk-3-dev
Hello
- Prepare the source Create a file main.c:
- create a Meson build description Create a file called meson.build:
- initialize the build Going into the source directory and issuing the following commands.
- to build the code
#include <stdio.h>
int main(int argc, char **argv) {
printf("Hello world.\n");
return 0;
}
project('tutorial', 'c')
executable('demo', 'main.c')
$ meson setup builddir
This will create a separate build directory called builddir.
$ cd builddir $ ninja

留言