diff options
| author | ruki <[email protected]> | 2020-04-05 14:47:59 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-04-05 14:47:59 +0800 |
| commit | c063689761dbc18e9222ac076c5e1ecda22897dd (patch) | |
| tree | 1148a0929df6ceed610ee9b64becab8446cdae8a | |
| parent | d3c6cfe5fbaa95c72e4579ca884e3ddedd83e1fd (diff) | |
add objc/bundle template
| -rw-r--r-- | xmake/templates/objc/bundle/project/src/Info.plist | 24 | ||||
| -rw-r--r-- | xmake/templates/objc/bundle/project/src/test.h | 3 | ||||
| -rw-r--r-- | xmake/templates/objc/bundle/project/src/test.m | 6 | ||||
| -rw-r--r-- | xmake/templates/objc/bundle/project/xmake.lua | 10 | ||||
| -rw-r--r-- | xmake/templates/objc/bundle/template.lua | 2 |
5 files changed, 45 insertions, 0 deletions
diff --git a/xmake/templates/objc/bundle/project/src/Info.plist b/xmake/templates/objc/bundle/project/src/Info.plist new file mode 100644 index 000000000..20608314e --- /dev/null +++ b/xmake/templates/objc/bundle/project/src/Info.plist @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleVersion</key> + <string>$(CURRENT_PROJECT_VERSION)</string> + <key>NSHumanReadableCopyright</key> + <string>Copyright © 2020 tboox. All rights reserved.</string> +</dict> +</plist> diff --git a/xmake/templates/objc/bundle/project/src/test.h b/xmake/templates/objc/bundle/project/src/test.h new file mode 100644 index 000000000..d882546d1 --- /dev/null +++ b/xmake/templates/objc/bundle/project/src/test.h @@ -0,0 +1,3 @@ +#import <Foundation/Foundation.h> + +FOUNDATION_EXPORT int add(int a, int b); diff --git a/xmake/templates/objc/bundle/project/src/test.m b/xmake/templates/objc/bundle/project/src/test.m new file mode 100644 index 000000000..84422f6a7 --- /dev/null +++ b/xmake/templates/objc/bundle/project/src/test.m @@ -0,0 +1,6 @@ +#include "test.h" + +int add(int a, int b) +{ + return a + b; +} diff --git a/xmake/templates/objc/bundle/project/xmake.lua b/xmake/templates/objc/bundle/project/xmake.lua new file mode 100644 index 000000000..2e23412e0 --- /dev/null +++ b/xmake/templates/objc/bundle/project/xmake.lua @@ -0,0 +1,10 @@ +add_rules("mode.debug", "mode.release") + +target("${TARGETNAME}") + add_rules("xcode.bundle") + add_files("src/*.m") + add_headerfiles("src/*.h") + add_installfiles("src/Info.plist") + --set_values("xcode.codesign_identity", "Apple Development: [email protected] (T3NA4MRVPU)") + +${FAQ} diff --git a/xmake/templates/objc/bundle/template.lua b/xmake/templates/objc/bundle/template.lua new file mode 100644 index 000000000..ce0949169 --- /dev/null +++ b/xmake/templates/objc/bundle/template.lua @@ -0,0 +1,2 @@ +template("bundle") + add_configfiles("xmake.lua") |
