xmake
xmake copied to clipboard
add_requires 顺序导致 package 无法引入
Xmake 版本
2.8.5+20231124
操作系统版本和架构
Ubuntu 20.04.5 LTS
描述问题
如果我调转 add_requires() 的顺序,target:add_packages 就会找不到依赖。
因为 zgpu 本身依赖了 zproto,我怀疑是我的依赖(zgpu)已经引用了(zproto),所以当前项目就没必要再引用间接依赖了,能强制设置成直接依赖吗,因为我需要它的 proto 文件编译代码
期待的结果
因为我依赖成品库的一些 conf 和 proto 文件,所以必须要拿到 target:pkg("zproto") 的属性。
工程配置
无
附加信息和错误日志
src-zproto:
src-zgpu:
Bot detected the issue body's language is not English, translate it automatically.
Title: add_requires order causes package to fail to be introduced
Xmake version
2.8.5+20231124
Operating system version and architecture
Ubuntu 20.04.5 LTS
Describe the problem
If I reverse the order of add_requires(), target:add_packages won't find the dependency.
Because zgpu itself depends on zproto, I suspect that my dependency (zgpu) has already referenced (zproto), so there is no need for the current project to reference indirect dependencies. Can it be forced to be a direct dependency, because I need its proto file Compile code
Expected results
Because I rely on some conf and proto files of the finished library, I must get the attributes of target:pkg("zproto").
Project configuration
none
Additional information and error logs
src-zproto:
src-zgpu:
给个完整可复现的 example
Bot detected the issue body's language is not English, translate it automatically.
Give a complete and reproducible example