diff options
| author | ruki <[email protected]> | 2019-09-19 00:55:37 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-09-18 23:33:46 +0800 |
| commit | 336029c68e4d0fc58bb55dca3ce5fb62bfdbf41b (patch) | |
| tree | 68072128ac59708b7f56615e626d87e30ed951e2 /xmake/templates/c++/tbox.shared/template.lua | |
| parent | bb3455b845e0b776937283b3ddae4ae557eea52e (diff) | |
rewrite templates
Diffstat (limited to 'xmake/templates/c++/tbox.shared/template.lua')
| -rw-r--r-- | xmake/templates/c++/tbox.shared/template.lua | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/xmake/templates/c++/tbox.shared/template.lua b/xmake/templates/c++/tbox.shared/template.lua index 31bd81e93..b89f57c26 100644 --- a/xmake/templates/c++/tbox.shared/template.lua +++ b/xmake/templates/c++/tbox.shared/template.lua @@ -1,25 +1,9 @@ --- set name -set_name("tbox.shared") - --- set description -set_description("The Shared Library (tbox)") - --- set project directory -set_projectdir("project") - --- add macros -add_macros("targetname", "$(targetname)") - --- add macro files -add_macrofiles("xmake.lua") -add_macrofiles("src/_demo/main.cpp") -add_macrofiles("src/_demo/xmake.lua") -add_macrofiles("src/_library/xmake.lua") - --- set create script -on_create(function () - - -- rename target directory - os.mv("src/_library", "src/$(targetname)") - os.mv("src/_demo", "src/$(targetname)_demo") -end) +template("tbox.shared") + add_configfiles("xmake.lua") + add_configfiles("src/_demo/main.cpp") + add_configfiles("src/_demo/xmake.lua") + add_configfiles("src/_library/xmake.lua") + after_create(function (template) + os.mv("src/_library", "src/${TARGETNAME}") + os.mv("src/_demo", "src/${TARGETNAME}_demo") + end) |
