summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-04-15 23:14:51 +0800
committerruki <[email protected]>2023-04-15 23:14:59 +0800
commit87f27acef8008bed8b81b7ea741c075d07f64ff4 (patch)
tree715899405fc313de5a97b3e8a3c24db3b27ba2bf
parentd6ee79eeddbe08617a41c24c2040aff37626f845 (diff)
limit conan to 1.x
-rw-r--r--xmake/modules/package/manager/conan/install_package.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/modules/package/manager/conan/install_package.lua b/xmake/modules/package/manager/conan/install_package.lua
index 550dbbe2e..bed8332d8 100644
--- a/xmake/modules/package/manager/conan/install_package.lua
+++ b/xmake/modules/package/manager/conan/install_package.lua
@@ -20,6 +20,7 @@
-- imports
import("core.base.option")
+import("core.base.semver")
import("core.project.config")
import("core.tool.toolchain")
import("core.platform.platform")
@@ -131,10 +132,13 @@ function main(name, opt)
local configs = opt.configs or {}
-- find conan
- local conan = find_tool("conan")
+ local conan = find_tool("conan", {version = true})
if not conan then
raise("conan not found!")
end
+ if conan.version then
+ assert(semver.compare(conan.version, "2.0") < 0, "conan %s is not supported, please use conan 1.x", conan.version)
+ end
-- get build directory
local buildir = _conan_get_build_directory(name)