Skip to content
Discussion options

You must be logged in to vote

关于这块,之前文档写的不明确,find_package 目前只能在脚本域使用,虽然也可以集成包,但是用法比较繁琐

现在不管是远程包,还是本地包,还是系统库,都是统一走 add_requires 集成,用法更加简单一致

关于 add_requires 对于第三方库的安装集成,可以看文档:https://xmake.io/#/zh-cn/package/remote_package?id=%e7%ac%ac%e4%b8%89%e6%96%b9%e4%be%9d%e8%b5%96%e5%8c%85%e5%ae%89%e8%a3%85

而 cmake 包,2.6.1 线上版本,add_requires 对它的处理还不是很好,不支持透传 configs ,但基础的集成也是可以用的。

我更新下了下文档,看下 https://xmake.io/#/zh-cn/package/local_package?id=%e5%9c%a8%e9%a1%b9%e7%9b%ae%e4%b8%ad%e9%9b%86%e6%88%90%e5%8c%85

如果你的 cmake::xxx 包用到了一些组件, envs 配置什么的,需要更新到 xmake 的 dev 版本,xmake update -s dev 才能支持上

用法见: https://xmake.io/#/zh-cn/package/local_package?id=%e6%8c%87%e5%ae%9a%e7%bb%84%e4%bb%b6

关于这块的相关 issues 见:#1632 (comment)

Replies: 1 comment 19 replies

Comment options

You must be logged in to vote
19 replies
@peter-233
Comment options

@waruqi
Comment options

@peter-233
Comment options

@waruqi
Comment options

@peter-233
Comment options

Answer selected by peter-233
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants