summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-01-25 22:40:23 +0800
committerruki <[email protected]>2019-01-25 10:02:19 +0800
commit725afa219b013720a363f84badfc6696951c9840 (patch)
treea10b8934a74ffee45c374ea789aaef8ab47b820f
parentcf136bafccf861a8257ace35a2ccbd8b75006bf7 (diff)
pass build requires to conan package
-rw-r--r--xmake/modules/package/manager/conan/install_package.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/modules/package/manager/conan/install_package.lua b/xmake/modules/package/manager/conan/install_package.lua
index 962c69fe5..ce24cda83 100644
--- a/xmake/modules/package/manager/conan/install_package.lua
+++ b/xmake/modules/package/manager/conan/install_package.lua
@@ -42,9 +42,9 @@ function _generate_conanfile(name, opt)
dprint("generate %s ..", conanfile)
-- get conan options and imports
- local conan_options = opt.options or {}
- local conan_imports = opt.imports or {}
- print(opt)
+ local options = table.wrap(opt.options)
+ local imports = table.wrap(opt.imports)
+ local build_requires = table.wrap(opt.build_requires)
-- generate it
io.writefile(conanfile, ([[
@@ -57,8 +57,8 @@ xmake
[imports]
%s
[build_requires]
-xmake_generator/0.1.0@conan/xmakegen
- ]]):format(name, table.concat(conan_options, "\n"), table.concat(conan_imports, "\n")))
+%s
+ ]]):format(name, table.concat(options, "\n"), table.concat(imports, "\n"), table.concat(build_requires, "\n")))
end
-- install package