This is a mirror page, please see the original page:

https://xmake.io/#/manual/target_instance

This page describes the interface for target of functions like on_load(), before_build() or after_install() of the Project target

target:name

target:get

-- get the links
target:get("links")
-- get the defined macros
target:get("defines")

target:set

-- set the links
target:set("links", "sdl2")
-- set the defined macros
target:set("defines", "SDL_MAIN_HANDLED")

target:add

-- add links
target:add("links", "sdl2")
-- add defined macros
target:add("defines", "SDL_MAIN_HANDLED")

!> 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