summaryrefslogtreecommitdiff
path: root/build/win32
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2016-03-11 11:48:14 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2016-03-11 11:48:14 +0800
commite75eef346bf5fc0644d98b7d5d8a20229d125eb6 (patch)
treeeb4da19f2b6b5513c00dc732a44600a871a8fb02 /build/win32
parentdb47c44565b443d8f1cb1280061762a7bc607a86 (diff)
downloadgobject-introspection-e75eef346bf5fc0644d98b7d5d8a20229d125eb6.tar.gz
MSVC builds: Make introspection builds a bit easier
GLib recently had a script that would generate the pkg-config files for its Visual Studio builds, which would be sufficient for the need of building introspection files, so update the NMake Makefile modules to look for them automatically, without the need to manually set PKG_CONFIG_PATH in the console, provided that the build was done in the same directory tree[1] and was not moved. Note that this would precede any PKG_CONFIG_PATH's that were already set in the console. [1]: This would mean: $(tree_root) | |--$(GLib_src_tree) |--$(G-I_src_tree) |...
Diffstat (limited to 'build/win32')
-rw-r--r--build/win32/introspection-msvc.mak17
1 files changed, 16 insertions, 1 deletions
diff --git a/build/win32/introspection-msvc.mak b/build/win32/introspection-msvc.mak
index d32f7cf5..fe4fa679 100644
--- a/build/win32/introspection-msvc.mak
+++ b/build/win32/introspection-msvc.mak
@@ -9,6 +9,20 @@
!if "$(PREFIX)" == ""
PREFIX = ..\..\..\vs$(VSVER)\$(PLAT)
+!if ![setlocal] && \
+ ![set PFX=$(PREFIX)] && \
+ ![for %P in (%PFX%) do @echo PREFIX_FULL=%~dpnfP > pfx.x]
+!endif
+!include pfx.x
+!endif
+
+!if "$(PKG_CONFIG_PATH)" == ""
+PKG_CONFIG_PATH=$(PREFIX_FULL)\lib\pkgconfig
+!else
+PKG_CONFIG_PATH=$(PREFIX_FULL)\lib\pkgconfig;$(PKG_CONFIG_PATH)
+!endif
+
+!if ![del $(ERRNUL) /q/f pfx.x]
!endif
# Note: The PYTHON must be the Python release series that was used to build
@@ -40,7 +54,8 @@ ERROR_MSG =
BUILD_INTROSPECTION = TRUE
-!if ![pkg-config --print-errors --errors-to-stdout $(CHECK_PACKAGE) > pkgconfig.x] \
+!if ![set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)] \
+ && ![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] \