]> wimlib.net Git - wimlib/commitdiff
tools/make-windows-release: ensure the headers in tools/windeps/ are used
authorEric Biggers <ebiggers3@gmail.com>
Tue, 29 Jun 2021 07:42:11 +0000 (00:42 -0700)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 29 Jun 2021 07:42:11 +0000 (00:42 -0700)
Avoid a build error due to the libxml2 headers not being found.

Previously it worked by chance due to the system headers being used.
This stopped working in Cygwin builds for some reason, though.

tools/make-windows-release

index 5c652cee87e3cde424d5e534fc5bb70ed1b0c85f..3bd8e47240c51c1d83f21da70705de56ca70561b 100755 (executable)
@@ -55,11 +55,15 @@ then
        # Note: putting -static-libgcc in CC is a workaround for libtool
        # stripping it:
        # http://www.gnu.org/software/libtool/manual/libtool.html#Stripped-link-flags
+       #
+       # We also need to override the MinGW pkg-config with the "native" one in
+       # order for it to correctly restrict the include path to our $SYSROOT.
        ./configure --host=${ARCH}-w64-mingw32 --disable-static         \
                CC="${ARCH}-w64-mingw32-gcc -static-libgcc"             \
                CPPFLAGS="-I$SYSROOT/include"                           \
                LDFLAGS="-L$SYSROOT/lib"                                \
-               PKG_CONFIG_PATH="$SYSROOT/lib/pkgconfig"                \
+               PKG_CONFIG=pkg-config                                   \
+               PKG_CONFIG_LIBDIR="$SYSROOT/lib/pkgconfig"              \
                --without-libcrypto                                     \
                $extra_args "$@"
        $MAKE clean