From 814a5cec414858ddbe7ae54da4535529cb712377 Mon Sep 17 00:00:00 2001 From: Miguel Pari Soto Date: Wed, 22 Jan 2020 11:48:33 -0300 Subject: [PATCH] feat(android): add support for android modules selection --- platforms/android/build_sdk.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platforms/android/build_sdk.py b/platforms/android/build_sdk.py index f9b4c1a8f3..8c0ef8978f 100755 --- a/platforms/android/build_sdk.py +++ b/platforms/android/build_sdk.py @@ -226,6 +226,9 @@ class Builder: if self.ninja_path != 'ninja': cmake_vars['CMAKE_MAKE_PROGRAM'] = self.ninja_path + if self.config.modules_list is not None: + cmd.append("-DBUILD_LIST='%s'" % self.config.modules_list) + if self.config.extra_modules_path is not None: cmd.append("-DOPENCV_EXTRA_MODULES_PATH='%s'" % self.config.extra_modules_path) @@ -374,6 +377,7 @@ if __name__ == "__main__": parser.add_argument('--ndk_path', help="Path to Android NDK to use for build") parser.add_argument('--sdk_path', help="Path to Android SDK to use for build") parser.add_argument('--use_android_buildtools', action="store_true", help='Use cmake/ninja build tools from Android SDK') + parser.add_argument("--modules_list", help="List of modules to include for build") parser.add_argument("--extra_modules_path", help="Path to extra modules to use for build") parser.add_argument('--sign_with', help="Certificate to sign the Manager apk") parser.add_argument('--build_doc', action="store_true", help="Build javadoc")