summaryrefslogtreecommitdiff
path: root/makefiles
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2012-05-12 17:59:02 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2012-05-12 17:59:02 +0000
commit8bc504dc7777cf2fa4899ec7c1fb75e29eeaf81f (patch)
tree98fba4cf1a4c0edde7244369ec01b484035a1fba /makefiles
parent29f791bb793077cdabc72c4f160948fa5afcf6da (diff)
downloadbuildsystem-8bc504dc7777cf2fa4899ec7c1fb75e29eeaf81f.tar.gz
buildsystem-8bc504dc7777cf2fa4899ec7c1fb75e29eeaf81f.tar.bz2
Add accessor for pkg-config variables
svn path=/trunk/tools/buildsystem/; revision=13919
Diffstat (limited to 'makefiles')
-rw-r--r--makefiles/Makefile.pkgconfig12
1 files changed, 12 insertions, 0 deletions
diff --git a/makefiles/Makefile.pkgconfig b/makefiles/Makefile.pkgconfig
index faf316a..c1cc123 100644
--- a/makefiles/Makefile.pkgconfig
+++ b/makefiles/Makefile.pkgconfig
@@ -86,3 +86,15 @@ define pkg_config_package_add_flags
endef
+# Obtain the value of a pkg-config variable
+# 1: Name of variable to assign result into
+# 2: Name of package to search for
+# 3: Name of pkg-config variable to retrieve
+define pkg_config_get_variable
+ ifeq ($$(PKGCONFIG),)
+ $$(error pkg-config is required to auto-detect package version)
+ endif
+
+ $(1) := $$(shell $$(PKGCONFIG) --variable=$(3) $(2))
+
+endef