From f5c9f44927d2d4bbf9b4e1c241c6f7d201b0e4a0 Mon Sep 17 00:00:00 2001 From: Kika <2421653893@qq.com> Date: Fri, 28 Jun 2024 11:28:44 +0800 Subject: [PATCH] Update option_instance.md --- manual/option_instance.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/manual/option_instance.md b/manual/option_instance.md index 203ce7f4..fccc3736 100644 --- a/manual/option_instance.md +++ b/manual/option_instance.md @@ -44,5 +44,20 @@ option:add("links", "sdl2") option:add("defines", "SDL_MAIN_HANDLED") ``` + +#### get_config + +- It is worth noting that you can also use `get_config` directly in the script domain to get the target's option values + +```lua +target("test") + set_kind("phony") + add_options("exp") + on_build(function (target) + print("$(exp)") + print(get_config("exp")) + end) +`` + !> The document here is still in progress, please be patient, you can also speed up the update of the document by sponsoring or submiting pr