Fix pkgconfig_build.bzl for Windows build with Bzlmod

This commit is contained in:
Yun Peng 2024-07-31 14:19:43 +02:00 committed by GitHub
parent fb209674f3
commit ffe5b1561a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -141,10 +141,10 @@ def pkgconfig_tool(name, srcs, **kwargs):
args = [ args = [
"-f Makefile.vc", "-f Makefile.vc",
"CFG=release", "CFG=release",
"GLIB_PREFIX=\"$$EXT_BUILD_ROOT/external/glib_dev\"", "GLIB_PREFIX=\"$$EXT_BUILD_ROOT/external/%s\"" % Label("@glib_dev").workspace_name,
], ],
out_binaries = ["pkg-config.exe"], out_binaries = ["pkg-config.exe"],
env = {"INCLUDE": "$$EXT_BUILD_ROOT/external/glib_src"}, env = {"INCLUDE": "$$EXT_BUILD_ROOT/external/%s" % Label("@glib_src").workspace_name},
out_static_libs = [], out_static_libs = [],
out_shared_libs = [], out_shared_libs = [],
deps = [ deps = [
@ -156,7 +156,7 @@ def pkgconfig_tool(name, srcs, **kwargs):
"@platforms//os:windows": "cp release/x64/pkg-config.exe $$INSTALLDIR$$/bin", "@platforms//os:windows": "cp release/x64/pkg-config.exe $$INSTALLDIR$$/bin",
"//conditions:default": "", "//conditions:default": "",
}), }),
toolchain = "@rules_foreign_cc//toolchains:preinstalled_nmake_toolchain", toolchain = Label("@rules_foreign_cc//toolchains:preinstalled_nmake_toolchain"),
tags = tags, tags = tags,
**kwargs **kwargs
) )