Skip to content

如何将 targetName 加入 define 列表? #6560

Answered by waruqi
Antecer asked this question in Q&A
Discussion options

You must be logged in to vote

写两次,又不花几秒钟时间,搞个 lua 变量都可以直接复用。。

非要搞,就脚本域搞

target("test")
    on_load(function (target)
         target:add("defines", "NAME=" .. target:name())
    end)

或者弄个 rule 搞。

不过有这时间,你描述域写两遍,老早搞完嘞

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@waruqi
Comment options

Answer selected by Antecer
@Antecer
Comment options

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