From 1be939c672bdd30ba92a910a85dcc67833c63005 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 5 Aug 2021 12:10:59 +1000 Subject: [PATCH] doc: add a meson example to the tutorial The vast majority of users will want to build with a build system, so let's add a minimal example there to avoid guesswork. --- doc/tutorial1.dox | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/tutorial1.dox b/doc/tutorial1.dox index e2230862d..9d3636bff 100644 --- a/doc/tutorial1.dox +++ b/doc/tutorial1.dox @@ -30,8 +30,10 @@ Before you can use any PipeWire functions, you need to call `pw_init()`. ## Compilation +PipeWire provides a pkg-config file named `libpipewire-0.3` (note: the version +suffix may change with future releases of pipewire). To compile the simple test application, copy it into a test1.c file and -use: +use pkg-config to provide the required dependencies: gcc -Wall test1.c -o test1 $(pkg-config --cflags --libs libpipewire-0.3) @@ -42,6 +44,15 @@ then run it with: Linked with libpipewire 0.3.5 # +Use your build system's pkg-config support to integrate it into your project. +For example, a minimal [meson.build](https://mesonbuild.com/) entry would look +like this: + + project('test1', ['c']) + pipewire_dep = dependency('libpipewire-0.3') + executable('test1', 'test1.c', + dependencies: [pipewire_dep]) + \ref page_tutorial "Index" | \ref page_tutorial2 */