aboutsummaryrefslogtreecommitdiffstats
path: root/meson/docs/markdown/Pkg-config-files.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/Pkg-config-files.md
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/docs/markdown/Pkg-config-files.md')
-rw-r--r--meson/docs/markdown/Pkg-config-files.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/meson/docs/markdown/Pkg-config-files.md b/meson/docs/markdown/Pkg-config-files.md
new file mode 100644
index 000000000..1fbef0bab
--- /dev/null
+++ b/meson/docs/markdown/Pkg-config-files.md
@@ -0,0 +1,30 @@
+# Pkg config files
+
+[Pkg-config](https://en.wikipedia.org/wiki/Pkg-config) is a way for
+shared libraries to declare the compiler flags needed to use them.
+There are two different ways of generating Pkg-config files in Meson.
+The first way is to build them manually with the `configure_file`
+command. The second way is to use Meson's built in Pkg-config file
+generator. The difference between the two is that the latter is very
+simple and meant for basic use cases. The former should be used when
+you need to provide a more customized solution.
+
+In this document we describe the simple generator approach. It is used in the following way.
+
+```meson
+pkg = import('pkgconfig')
+libs = ... # the library/libraries users need to link against
+h = ['.', ...] # subdirectories of ${prefix}/${includedir} to add to header path
+pkg.generate(libraries : libs,
+ subdirs : h,
+ version : '1.0',
+ name : 'libsimple',
+ filebase : 'simple',
+ description : 'A simple demo library.')
+```
+
+This causes a file called `simple.pc` to be created and placed into
+the install directory during the install phase.
+
+More information on the pkg-config module and the parameters can be
+found on the [pkgconfig-module](Pkgconfig-module.md) page.