diff options
| -rw-r--r-- | xmake/modules/package/manager/conan/install_package.lua | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/xmake/modules/package/manager/conan/install_package.lua b/xmake/modules/package/manager/conan/install_package.lua index 905c75078..06963ae00 100644 --- a/xmake/modules/package/manager/conan/install_package.lua +++ b/xmake/modules/package/manager/conan/install_package.lua @@ -121,12 +121,22 @@ function main(name, opt) end -- set build mode + table.insert(argv, "-s") if opt.mode == "debug" then - table.insert(argv, "-s") table.insert(argv, "build_type=Debug") + else + table.insert(argv, "build_type=Release") end - -- TODO pass compiler settings + -- set compiler settings + if opt.plat == "windows" then + local vsvers = {["2017"] = "15", ["2015"] = "14", ["2013"] = "12", ["2012"] = "11", ["2010"] = "10", ["2008"] = "9", ["2005"] = "8"} + local vs = assert(config.get("vs"), "vs not found!") + table.insert(argv, "-s") + table.insert(argv, "compiler=Visual Studio") + table.insert(argv, "-s") + table.insert(argv, "compiler.version=" .. assert(vsvers[vs], "unknown msvc version!")) + end -- set remote if opt.remote then |
