summaryrefslogtreecommitdiff
path: root/xmake/templates/objc++/console
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/templates/objc++/console')
-rw-r--r--xmake/templates/objc++/console/src/main.mm8
-rw-r--r--xmake/templates/objc++/console/xmake.lua13
2 files changed, 21 insertions, 0 deletions
diff --git a/xmake/templates/objc++/console/src/main.mm b/xmake/templates/objc++/console/src/main.mm
new file mode 100644
index 000000000..cbd1e8906
--- /dev/null
+++ b/xmake/templates/objc++/console/src/main.mm
@@ -0,0 +1,8 @@
+#import <Foundation/Foundation.h>
+
+int main(int argc, char** argv) {
+ @autoreleasepool {
+ NSLog(@"hello world!");
+ }
+ return 0;
+}
diff --git a/xmake/templates/objc++/console/xmake.lua b/xmake/templates/objc++/console/xmake.lua
new file mode 100644
index 000000000..99749f901
--- /dev/null
+++ b/xmake/templates/objc++/console/xmake.lua
@@ -0,0 +1,13 @@
+-- add modes: debug and release
+add_rules("mode.debug", "mode.release")
+
+-- add target
+target("${TARGET_NAME}")
+
+ -- set kind
+ set_kind("binary")
+
+ -- add files
+ add_files("src/*.mm")
+
+${FAQ}