summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-01-31 22:39:36 +0800
committerruki <[email protected]>2019-01-31 09:57:36 +0800
commit3d89aadd3022c5cc58dce1e15997568e4be60162 (patch)
tree3256636a65d3f75e1140364082374b32fb506a2e
parent17c9dbc7d234dafcff6fcf0d20d016472fcc9061 (diff)
pass custom settings to conan
-rw-r--r--xmake/modules/package/manager/conan/install_package.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/xmake/modules/package/manager/conan/install_package.lua b/xmake/modules/package/manager/conan/install_package.lua
index 06963ae00..4fdb66ffa 100644
--- a/xmake/modules/package/manager/conan/install_package.lua
+++ b/xmake/modules/package/manager/conan/install_package.lua
@@ -61,7 +61,9 @@ end
-- install package
--
-- @param name the package name, e.g. conan::OpenSSL/1.0.2n@conan/stable
--- @param opt the options, .e.g {verbose = true, mode = "release", plat = , arch = , remote = "", build = "all", options = {}, imports = {}, build_requires = {}}
+-- @param opt the options, .e.g { verbose = true, mode = "release", plat = , arch = ,
+-- remote = "", build = "all", options = {}, imports = {}, build_requires = {},
+-- settings = {"compiler=Visual Studio", "compiler.version=10", "compiler.runtime=MD"}}
--
-- @return true or false
--
@@ -138,6 +140,12 @@ function main(name, opt)
table.insert(argv, "compiler.version=" .. assert(vsvers[vs], "unknown msvc version!"))
end
+ -- set custom settings
+ for _, setting in ipairs(opt.settings) do
+ table.insert(argv, "-s")
+ table.insert(argv, setting)
+ end
+
-- set remote
if opt.remote then
table.insert(argv, "-r")