diff options
Diffstat (limited to 'xmake/templates/objc++')
| -rw-r--r-- | xmake/templates/objc++/console/project/xmake.lua | 45 | ||||
| -rw-r--r-- | xmake/templates/objc++/console/template.lua | 16 |
2 files changed, 14 insertions, 47 deletions
diff --git a/xmake/templates/objc++/console/project/xmake.lua b/xmake/templates/objc++/console/project/xmake.lua index 68cba346c..736de146c 100644 --- a/xmake/templates/objc++/console/project/xmake.lua +++ b/xmake/templates/objc++/console/project/xmake.lua @@ -1,38 +1,8 @@ --- the debug mode -if is_mode("debug") then - - -- enable the debug symbols - set_symbols("debug") - - -- disable optimization - set_optimize("none") -end - --- the release mode -if is_mode("release") then - - -- set the symbols visibility: hidden - set_symbols("hidden") - - -- enable fastest optimization - set_optimize("fastest") - - -- strip all symbols - set_strip("all") -end - --- add frameworks -add_frameworks("Foundation", "CoreFoundation") - --- for macosx or ios -if is_os("macosx", "ios") then - - -- enable arc? - add_mxflags("-fobjc-arc") -end +-- add modes: debug and release +add_rules("mode.debug", "mode.release") -- add target -target("[targetname]") +target("${TARGETNAME}") -- set kind set_kind("binary") @@ -40,3 +10,12 @@ target("[targetname]") -- add files add_files("src/*.mm") + -- for macosx or ios + if is_os("macosx", "ios") then + add_mxflags("-fobjc-arc") + end + + -- add frameworks + add_frameworks("Foundation", "CoreFoundation") + +${FAQ} diff --git a/xmake/templates/objc++/console/template.lua b/xmake/templates/objc++/console/template.lua index 52c362723..ed2e13b57 100644 --- a/xmake/templates/objc++/console/template.lua +++ b/xmake/templates/objc++/console/template.lua @@ -1,14 +1,2 @@ --- set name -set_name("console") - --- set description -set_description("The Console Program") - --- set project directory -set_projectdir("project") - --- add macros -add_macros("targetname", "$(targetname)") - --- add macro files -add_macrofiles("xmake.lua") +template("console") + add_configfiles("xmake.lua") |
