Skip to content

Commit 14f9fd2

Browse files
drelaptopminggo
authored andcommitted
add cmake build-type for android, set it as default (#445)
* add cmake build-type for android * android build type, default to cmake
1 parent 9e96ca0 commit 14f9fd2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

bin/strings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
"COMPILE_ARG_OUTPUT" : "Specify the output directory.",
137137
"COMPILE_ARG_GROUP_ANDROID" : "Android Options",
138138
"COMPILE_ARG_AP" : "Specify the Android platform used for building Android apk.",
139-
"COMPILE_ARG_BUILD_TYPE" : "Set the compiling type of native code, should be ndk-build|none, default is ndk-build. Native code will not be compiled when the value is none.",
139+
"COMPILE_ARG_BUILD_TYPE" : "Set the compiling type of native code, should be cmake|ndk-build|none, default is cmake. Native code will not be compiled when the value is none.",
140140
"COMPILE_ARG_APP_ABI" : "Set the APP_ABI of ndk-build.Can be multi value separated with ':'. Sample : --app-abi armeabi-v7a:x86. Default value is 'armeabi-v7a'.",
141141
"COMPILE_ARG_TOOLCHAIN" : "Specify the NDK_TOOLCHAIN of ndk-build.",
142142
"COMPILE_ARG_CPPFLAGS" : "Specify the APP_CPPFLAGS of ndk-build.",
@@ -482,7 +482,7 @@
482482
"COMPILE_ARG_OUTPUT" : "指定输出文件的路径。",
483483
"COMPILE_ARG_GROUP_ANDROID" : "Android 相关参数",
484484
"COMPILE_ARG_AP" : "指定编译 Android 工程所需使用的目标平台。",
485-
"COMPILE_ARG_BUILD_TYPE" : "设置 native code 的编译类型,可选值为 ndk-build|none,默认值为 ndk-build。如果指定为 none,native code 不会被编译。",
485+
"COMPILE_ARG_BUILD_TYPE" : "设置 native code 的编译类型,可选值为 cmake|ndk-build|none,默认值为 cmake。如果指定为 none,native code 不会被编译。",
486486
"COMPILE_ARG_APP_ABI" : "设置 ndk-build 的 APP_ABI 属性。可以使用 ':' 分隔多个值。示例:--app-abi armeabi-v7a:x86。默认值为 'armeabi-v7a'。",
487487
"COMPILE_ARG_TOOLCHAIN" : "指定 ndk-build 的 NDK_TOOLCHAIN 属性。",
488488
"COMPILE_ARG_CPPFLAGS" : "指定 ndk-build 的 APP_CPPFLAGS 属性。",
@@ -827,7 +827,7 @@
827827
"COMPILE_ARG_OUTPUT" : "指定輸出檔案的路徑。",
828828
"COMPILE_ARG_GROUP_ANDROID" : "Android 相關參數",
829829
"COMPILE_ARG_AP" : "指定編譯 Android 工程所需使用的目標平臺。",
830-
"COMPILE_ARG_BUILD_TYPE" : "設置 native code 的編譯類型,可選值為 ndk-build|none,默認值為 ndk-build。如果指定為 none,native code 不會被编译。",
830+
"COMPILE_ARG_BUILD_TYPE" : "設置 native code 的編譯類型,可選值為 cmake|ndk-build|none,默認值為 cmake。如果指定為 none,native code 不會被编译。",
831831
"COMPILE_ARG_APP_ABI" : "設置 ndk-build 的 APP_ABI 屬性。可以使用 ':' 分隔多個值。示例:--app-abi armeabi-v7a:x86。默認值為 'armeabi-v7a'。",
832832
"COMPILE_ARG_TOOLCHAIN" : "指定 ndk-build 的 NDK_TOOLCHAIN 屬性。",
833833
"COMPILE_ARG_CPPFLAGS" : "指定 ndk-build 的 APP_CPPFLAGS 屬性。",

plugins/plugin_compile/project_compile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ def _check_custom_options(self, args):
129129
available_modes))
130130

131131
# android arguments
132-
available_build_types = [ 'ndk-build', 'none'] # TODO, support cmake
133-
self._build_type = self.check_param(args.build_type, 'ndk-build', available_build_types,
132+
available_build_types = [ 'cmake','ndk-build', 'none']
133+
self._build_type = self.check_param(args.build_type, 'cmake', available_build_types,
134134
MultiLanguage.get_string('COMPILE_ERROR_WRONG_BUILD_TYPE_FMT',
135135
available_build_types))
136136
self._no_apk = args.no_apk

0 commit comments

Comments
 (0)