xmake 如何处理一个库在不同系统不同名的情况 #6515
-
我在 linux (nixos)编译一个软件(LCUI)时,安装了 libyaml 依赖,但 xmake 没有使用系统库,仍然从 xrepo 下载,构建配置写的是:
通过 pkg-config 查找库的名字其实是 “yaml”,不带 lib 前缀
修改之后,就可以正常使用:
但是如果系统库没有安装libyaml,这种写法没有办法 fallback 到 xrepo 没有办法优雅的处理这个库有时候叫 yaml 有时候叫 libyaml 的情况 |
Beta Was this translation helpful? Give feedback.
Answered by
star-hengxing
May 30, 2025
Replies: 1 comment 3 replies
-
试下在 libyaml 包描述里加上 |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
wineee
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
试下在 libyaml 包描述里加上
add_extsources("pkgconfig::yaml")