From d65e144a3f8c3f48d7db30bea1482c4b39acd7a1 Mon Sep 17 00:00:00 2001 From: kaoru Date: Sat, 27 Apr 2024 12:46:54 +0800 Subject: more triplet detect for vcpkg --- xmake/modules/package/manager/vcpkg/configurations.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xmake/modules/package/manager/vcpkg/configurations.lua b/xmake/modules/package/manager/vcpkg/configurations.lua index df79e1bd2..c5ba8dcc5 100644 --- a/xmake/modules/package/manager/vcpkg/configurations.lua +++ b/xmake/modules/package/manager/vcpkg/configurations.lua @@ -56,6 +56,14 @@ function triplet(configs, plat, arch) if configs.runtimes and configs.runtimes:startswith("MD") then triplet = triplet .. "-md" end + elseif plat == "linux" then + if (arch == "x64" or arch == "x86") and configs.shared == true then + triplet = triplet .. "-dynamic" + end + elseif plat == "macosx" then + if arch == "x64" and configs.shared == true then + triplet = triplet .. "-dynamic" + end elseif plat == "mingw" then triplet = triplet .. (configs.shared ~= true and "-static" or "-dynamic") end -- cgit v1.3.1