summaryrefslogtreecommitdiff
path: root/xmake/templates/objc/console
diff options
context:
space:
mode:
authorruki <[email protected]>2019-09-19 00:55:37 +0800
committerruki <[email protected]>2019-09-18 23:33:46 +0800
commit336029c68e4d0fc58bb55dca3ce5fb62bfdbf41b (patch)
tree68072128ac59708b7f56615e626d87e30ed951e2 /xmake/templates/objc/console
parentbb3455b845e0b776937283b3ddae4ae557eea52e (diff)
rewrite templates
Diffstat (limited to 'xmake/templates/objc/console')
-rw-r--r--xmake/templates/objc/console/project/xmake.lua22
-rw-r--r--xmake/templates/objc/console/template.lua16
2 files changed, 12 insertions, 26 deletions
diff --git a/xmake/templates/objc/console/project/xmake.lua b/xmake/templates/objc/console/project/xmake.lua
index 0477ea739..199d79528 100644
--- a/xmake/templates/objc/console/project/xmake.lua
+++ b/xmake/templates/objc/console/project/xmake.lua
@@ -1,19 +1,8 @@
-
-- add modes: debug and release
add_rules("mode.debug", "mode.release")
--- add frameworks
-add_frameworks("Foundation", "CoreFoundation")
-
--- for macosx or ios
-if is_os("macosx", "ios") then
-
- -- enable arc?
- add_mxflags("-fobjc-arc")
-end
-
-- add target
-target("[targetname]")
+target("${TARGETNAME}")
-- set kind
set_kind("binary")
@@ -21,3 +10,12 @@ target("[targetname]")
-- add files
add_files("src/*.m")
+ -- add frameworks
+ add_frameworks("Foundation", "CoreFoundation")
+
+ -- for macosx or ios
+ if is_os("macosx", "ios") then
+ add_mxflags("-fobjc-arc")
+ end
+
+${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")