From 9f594974a93a83373458f15b8c826573e2283c06 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Mon, 11 Apr 2016 11:11:40 +0800 Subject: 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. --- build/win32/introspection-msvc.mak | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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] \ -- cgit v1.2.1