Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes freebsd platform triplet name #2773

Merged
merged 3 commits into from
Sep 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions xmake/modules/package/manager/vcpkg/configurations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ function arch(arch)
return archs[arch] or arch
end

-- get platform for vcpkg
function plat(plat)
local plats = {
macosx = "osx",
bsd = "freebsd",
}
return plats[plat] or plat
end

-- get configurations
function main()
return {
Expand Down
7 changes: 3 additions & 4 deletions xmake/modules/package/manager/vcpkg/find_package.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ function _find_package(vcpkgdir, name, opt)
local arch = opt.arch
local plat = opt.plat
local mode = opt.mode
if plat == "macosx" then
plat = "osx"
end
arch = configurations.arch(arch)

plat = configurations.plat(plat)
arch = configurations.arch(arch)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incorrect indent


-- get the vcpkg info directories
local infodirs = {}
Expand Down
14 changes: 4 additions & 10 deletions xmake/modules/package/manager/vcpkg/install_package.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ function _install_for_classic(vcpkg, name, opt)
local arch = opt.arch
local plat = opt.plat
local mode = opt.mode
if plat == "macosx" then
plat = "osx"
end
arch = configurations.arch(arch)
plat = configurations.plat(plat)
arch = configurations.arch(arch)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here


-- init triplet
local triplet = arch .. "-" .. plat
Expand Down Expand Up @@ -80,12 +78,8 @@ function _install_for_manifest(vcpkg, name, opt)
-- init triplet
local arch = opt.arch
local plat = opt.plat
if plat == "macosx" then
plat = "osx"
elseif plat == "bsd" then
plat = "freebsd"
end
arch = configurations.arch(arch)
plat = configurations.plat(plat)
arch = configurations.arch(arch)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already fixed in b65703e

local triplet = arch .. "-" .. plat
if opt.plat == "windows" and configs.shared ~= true then
triplet = triplet .. "-static"
Expand Down