vcpkg doesn't generate valid manifests and configuration files.
Xmake Version
v2.9.5+HEAD.d30de52e9
Operating System Version and Architecture
Windows 11
Describe Bug
xmake doesn't create valid stub vcpkg.json and vcpkg-configuration.json files, which doesn't make integration seamless. I often have to manually edit and/or modify vcpkg installation to make it work with calls made from xmake.
looking at the code, it doesn't seem to follow vcpkg schemas
vcpkg-configuration.schema.json
for example, I'm unable to set "default-registry" value.
it would be nice to support those files out of the box, or at least provide a way to provide custom settings for both of them
Expected Behavior
I'd like to be able to more precisely control the output of both vcpkg.json and vcpkg-configuration.json because of the registries and overlays.
For example, a project I use vcpkg as a manifest provides "default-registry" key for configuration file, and it isn't supported by xmake.
Project Configuration
function vcpkg(name, configs)
if not configs then
configs = {}
end
-- Must match a release commit from https://github.com/microsoft/vcpkg/
local baseline = "511d74f695bd45959d12b50b00f1b68f69e8f0b0"
configs["baseline"] = baseline
-- Will cause trouble
-- configs["default_registries"] = {
-- kind = "git",
-- baseline = baseline,
-- repository = "https://github.com/microsoft/vcpkg"
-- }
configs["registries"] = {
{
kind = "artifact",
location = "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
name = "microsoft"
}
}
add_requires("vcpkg::" .. name, {
alias = name,
configs = configs,
})
end
vcpkg("asio")
-- ...
Additional Information and Error Logs
warning: configuration contains the following unrecognized fields:
$.default-registriesIf these are documented fields that should be recognized try updating the vcpkg tool.
Therefore, use packages from the xmake-repo repository as much as possible.