如何根据版本号添加包配置 #3477
Answered
by
waruqi
MasterBalll
asked this question in
Q&A
如何根据版本号添加包配置
#3477
-
比如包定义里有这么一个配置,它是 v0.2 新增的,如何能让它只在使用 v0.2 版本的包时生效,对于使用更早版本的包无效,似乎在 on_load 中添加是不生效的。 package("abc")
...
add_versions("0.2.0","xxx")
add_versions("0.1.1","xxx")
add_configs("sim", {description = "Set simulation.", default = "pc"})
... |
Beta Was this translation helpful? Give feedback.
Answered by
waruqi
Mar 8, 2023
Replies: 1 comment 6 replies
-
add_requires("abc 0.1.1") 手动定下版本 |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
MasterBalll
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add_requires("abc 0.1.1") 手动定下版本
或者走版本锁定 https://xmake.io/#/zh-cn/package/remote_package?id=%e4%be%9d%e8%b5%96%e5%8c%85%e7%9a%84%e9%94%81%e5%ae%9a%e5%92%8c%e5%8d%87%e7%ba%a7