Skip to content

Does XMake support directory scoped variables like CMake ? #5106

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

You must be logged in to vote

lua variable? custom option?

please do not access lua variable of the description scope in script scope.

if it's custom option, you can use get_config("xxx")

or you can use target:values("xxx") and set_values("xxx")

local val = "xxx"
target("test")
     set_values(val)
     on_config(function (target)
         print(target:values("xxx"))
     end)

try set_values

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@glenncoombs42
Comment options

@waruqi
Comment options

@glenncoombs42
Comment options

Comment options

You must be logged in to vote
1 reply
@glenncoombs42
Comment options

Answer selected by glenncoombs42
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