如何在创建Conan包时导出包消费者的Conan配方?

huangapple go评论64阅读模式
英文:

When creating a Conan package, how can I export a package consumer conan recipe?

问题

我想知道如何将Conan配方导出,以供用户使用(其中包括从源代码构建软件包并将二进制文件安装在系统的特定目录中),而不是我用来创建软件包的配方。

我一直在阅读Conan官方文档中的这一部分:

https://docs.conan.io/en/latest/mastering/conanfile_py.html#

但似乎我并不完全理解它是如何工作的。

英文:

I would like to know how to export a Conan recipe to be used by the consumer (which, among other things, will build the package from source and install the binaries in specific directories in the system) instead of the one I used to create the package.

I've been reading this section on Conan official documentation:

https://docs.conan.io/en/latest/mastering/conanfile_py.html#

but I don't seem to understand exactly how it works.

答案1

得分: 0

After running 'conan create' command, I used 'conan export' command with the following arguments:

conan export <consumer_conan_recipe> <package_name> -ks

where '-ks' prevents the command from removing the source folder in the local cache, even if the recipe changed (source: 'conan export --help' command)

英文:

After running &#39;conan create&#39; command, I used &#39;conan export&#39; command with the following arguments:

conan export &lt;consumer_conan_recipe&gt; &lt;package_name&gt; -ks

where -ks prevents the command from removing the source folder in the local cache, even if the recipe changed (source: &#39;conan export --help&#39; command)

huangapple
  • 本文由 发表于 2023年2月16日 18:58:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/75471281.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定