How to include a directory provided on the command line? #4708
Unanswered
davidchisnall
asked this question in
Q&A
Replies: 2 comments 3 replies
-
We can not use option value in includes directly, but you can try. option("test", {description = ".."})
if has_config("test") then
includes("test")
end or option("test", {description = ".."})
if is_config("test", "value") then
includes("test")
end or option("test", {description = ".."})
local value = get_config("test")
if value then
includes("test" .. value)
end |
Beta Was this translation helpful? Give feedback.
2 replies
-
Of course, the recommended approach is to include all scripts in the description scope, and then enable or disable the target or something else in the script scope. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have tried passing the value of an
option
toincludes
but I can't make it work. Is there a way of accessing option values at description scope? We need user code to provide the path to where they have put our SDK, which contains the xmake.lua that describes how to build a project. Currently, this ends up being hard coded in the project's xmake.lua and needs to be edited by hand, but I'm sure there's a better way of doing it.Beta Was this translation helpful? Give feedback.
All reactions