diff options
| -rw-r--r-- | xmake/modules/package/manager/vcpkg/find_package.lua | 15 | ||||
| -rw-r--r-- | xmake/modules/package/manager/vcpkg/install_package.lua | 15 |
2 files changed, 30 insertions, 0 deletions
diff --git a/xmake/modules/package/manager/vcpkg/find_package.lua b/xmake/modules/package/manager/vcpkg/find_package.lua index f9579fd66..b3466ad94 100644 --- a/xmake/modules/package/manager/vcpkg/find_package.lua +++ b/xmake/modules/package/manager/vcpkg/find_package.lua @@ -79,11 +79,26 @@ function main(name, opt) local arch = opt.arch local plat = opt.plat local mode = opt.mode + + -- mapping plat if plat == "macosx" then plat = "osx" end + + -- mapping arch if arch == "x86_64" then arch = "x64" + elseif arch == "i386" then + arch = "x86" + -- android: armeabi armeabi-v7a arm64-v8a x86 x86_64 mips mip64 + -- vcpkg triplets not support plat_android, but offers a doc: https://github.com/microsoft/vcpkg/blob/master/docs/users/android.md + elseif arch == "arm64-v8a" then + arch = "arm64" + elseif arch == "armeabi-v7a" then + arch = "arm" + -- ios: arm64 armv7 armv7s i386 + elseif arch == "armv7" or arch == "armv7s" then + arch = "arm" end -- get the vcpkg installed directory diff --git a/xmake/modules/package/manager/vcpkg/install_package.lua b/xmake/modules/package/manager/vcpkg/install_package.lua index d44c6e849..115493b35 100644 --- a/xmake/modules/package/manager/vcpkg/install_package.lua +++ b/xmake/modules/package/manager/vcpkg/install_package.lua @@ -41,11 +41,26 @@ function main(name, opt) local arch = opt.arch local plat = opt.plat local mode = opt.mode + + -- mapping plat if plat == "macosx" then plat = "osx" end + + -- mapping arch if arch == "x86_64" then arch = "x64" + elseif arch == "i386" then + arch = "x86" + -- android: armeabi armeabi-v7a arm64-v8a x86 x86_64 mips mip64 + -- vcpkg triplets not support plat_android, but offers a doc: https://github.com/microsoft/vcpkg/blob/master/docs/users/android.md + elseif arch == "arm64-v8a" then + arch = "arm64" + elseif arch == "armeabi-v7a" then + arch = "arm" + -- ios: arm64 armv7 armv7s i386 + elseif arch == "armv7" or arch == "armv7s" then + arch = "arm" end -- init triplet |
