[gobject-introspection] MSVC builds: Make introspection builds a bit easier



commit e75eef346bf5fc0644d98b7d5d8a20229d125eb6
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Mar 11 11:48:14 2016 +0800

    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)
        |...

 build/win32/introspection-msvc.mak |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/build/win32/introspection-msvc.mak b/build/win32/introspection-msvc.mak
index d32f7cf..fe4fa67 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]       \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]