summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2016-04-11 11:11:40 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2016-04-11 11:11:40 +0800
commitf5565ba632cf78ca2bd4b538eac1bf0cb8b393bd (patch)
tree2763f26c48fd68a909fca3ab22b5e5c1a4ef01e9
parent42bf17a25c7379689fe78f31f332a64e3eded5d2 (diff)
downloadgobject-introspection-f5565ba632cf78ca2bd4b538eac1bf0cb8b393bd.tar.gz
MSVC builds: Use a envvar for pkg-config
Allow using a envvar to specify the path to pkg-config, as it may not be in the PATH. Suggestion given by the HexChat project.
-rw-r--r--build/win32/introspection-msvc.mak7
1 files changed, 6 insertions, 1 deletions
diff --git a/build/win32/introspection-msvc.mak b/build/win32/introspection-msvc.mak
index f6fff49c..87398442 100644
--- a/build/win32/introspection-msvc.mak
+++ b/build/win32/introspection-msvc.mak
@@ -37,6 +37,11 @@ PKG_CONFIG_PATH=$(PREFIX_FULL)\lib\pkgconfig;$(PKG_CONFIG_PATH)
PYTHON=python
!endif
+# Path to the pkg-config tool, if not already in the PATH
+!if "$(PKG_CONFIG)" == ""
+PKG_CONFIG=pkg-config
+!endif
+
# Don't change anything following this line!
GIR_SUBDIR = share\gir-1.0
@@ -56,7 +61,7 @@ ERROR_MSG =
BUILD_INTROSPECTION = TRUE
!if ![set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)] \
- && ![pkg-config --print-errors --errors-to-stdout $(CHECK_PACKAGE) > pkgconfig.x] \
+ && ![$(PKG_CONFIG) --print-errors --errors-to-stdout $(CHECK_PACKAGE) > pkgconfig.x] \
&& ![setlocal] \
&& ![set file="pkgconfig.x"] \
&& ![FOR %A IN (%file%) DO @echo PKG_CHECK_SIZE=%~zA > pkgconfig.chksize] \