summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-05-02 22:53:15 +0800
committerruki <[email protected]>2023-05-02 22:53:15 +0800
commit4f89cfadfd187382802dbc3ef2332eadc6f548af (patch)
tree32f5f3b00fec80299d80a8a25ae325bbd7919201
parent54705be6387cddcf0a8689a5f62114463e26189b (diff)
remove imports
-rw-r--r--tests/projects/package/conan/xmake.lua4
-rw-r--r--xmake/modules/package/manager/conan/configurations.lua4
-rw-r--r--xmake/modules/package/manager/conan/v2/install_package.lua5
3 files changed, 4 insertions, 9 deletions
diff --git a/tests/projects/package/conan/xmake.lua b/tests/projects/package/conan/xmake.lua
index 3021fab7c..fcd36e3a8 100644
--- a/tests/projects/package/conan/xmake.lua
+++ b/tests/projects/package/conan/xmake.lua
@@ -1,6 +1,6 @@
add_requires("conan::zlib 1.2.11", {alias = "zlib", debug = true})
-add_requires("conan::openssl 1.1.1g", {alias = "openssl",
- configs = {options = "OpenSSL:shared=True"}})
+add_requires("conan::openssl 1.1.1t", {alias = "openssl",
+ configs = {options = "openssl/*:shared=True"}})
target("test")
set_kind("binary")
diff --git a/xmake/modules/package/manager/conan/configurations.lua b/xmake/modules/package/manager/conan/configurations.lua
index 6f99742f1..8667ab112 100644
--- a/xmake/modules/package/manager/conan/configurations.lua
+++ b/xmake/modules/package/manager/conan/configurations.lua
@@ -24,9 +24,9 @@ function main()
{
build = {description = "Use it to choose if you want to build from sources.", default = "missing", values = {"all", "never", "missing", "outdated"}},
remote = {description = "Set the conan remote server."},
- options = {description = "Set the options values, e.g. OpenSSL:shared=True"},
- imports = {description = "Set the imports for conan."},
+ options = {description = "Set the options values, e.g. shared=True"}, -- TODO
settings = {description = "Set the build settings for conan."},
+ imports = {description = "Set the imports for conan 1.x, it has been deprecated in conan 2.x."},
build_requires = {description = "Set the build requires for conan."}
}
end
diff --git a/xmake/modules/package/manager/conan/v2/install_package.lua b/xmake/modules/package/manager/conan/v2/install_package.lua
index 3565e6455..694fd5ff1 100644
--- a/xmake/modules/package/manager/conan/v2/install_package.lua
+++ b/xmake/modules/package/manager/conan/v2/install_package.lua
@@ -57,7 +57,6 @@ function _conan_generate_conanfile(name, configs, opt)
-- get conan options, imports and build_requires
local options = table.wrap(configs.options)
- local imports = table.wrap(configs.imports)
local build_requires = table.wrap(configs.build_requires)
-- @see https://docs.conan.io/en/latest/systems_cross_building/cross_building.html
@@ -75,10 +74,6 @@ function _conan_generate_conanfile(name, configs, opt)
conanfile:print("[options]")
conanfile:print("%s", table.concat(options, "\n"))
end
- if #imports > 0 then
- conanfile:print("[imports]")
- conanfile:print("%s", table.concat(imports, "\n"))
- end
if #build_requires > 0 then
conanfile:print("[build_requires]")
conanfile:print("%s", table.concat(build_requires, "\n"))