aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/pkgconfig_var_escaping.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/markdown/snippets/pkgconfig_var_escaping.md b/docs/markdown/snippets/pkgconfig_var_escaping.md
new file mode 100644
index 0000000..de0ee96
--- /dev/null
+++ b/docs/markdown/snippets/pkgconfig_var_escaping.md
@@ -0,0 +1,23 @@
+## Unescaped variables in pkgconfig files
+
+Spaces in variable values are escaped with `\`, this is required in the case the
+value is a path that and is used in `cflags` or `libs` arguments. This was an
+undocumented behaviour that caused issues in the case the variable is a space
+separated list of items.
+
+For backward compatibility reasons this behaviour could not be changed, new
+keyword arguments have thus been added: `unescaped_variables` and
+`unescaped_uninstalled_variables`.
+
+```meson
+pkg = import('pkgconfig')
+...
+pkg.generate(lib,
+ variables: {
+ 'mypath': '/path/with spaces/are/escaped',
+ },
+ unescaped_variables: {
+ 'mylist': 'Hello World Is Not Escaped',
+ },
+)
+```