-
如果需要在on_load里面通过脚本计算configvar的值,怎么样把计算的值传给target?
似乎不行 |
Beta Was this translation helpful? Give feedback.
Answered by
waruqi
Nov 30, 2021
Replies: 1 comment 1 reply
-
target("tsss")
set_kind("binary")
add_files("src/*.cpp")
add_configfiles("config.h.in")
on_load(function (target)
target:set("configvar", "TEST", 1)
end) $ xmake f -c
generating config.h.in to build/config.h ..
checking for git ... /usr/bin/git
> replace TEST -> 1
generating config.h.in ... ok 这不是可以的么 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
xq114
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这不是可以的么