add component disable flag to android build#25190
Merged
asmorkalov merged 2 commits intoopencv:4.xfrom Mar 27, 2024
Merged
Conversation
Contributor
opencv-alalek
left a comment
There was a problem hiding this comment.
BTW, this could be handled by using own "config" file for your SDK recipe.
platforms/android/build_sdk.py
Outdated
| parser.add_argument('--no_kotlin', action="store_true", help="Disable Kotlin extensions") | ||
| parser.add_argument('--shared', action="store_true", help="Build shared libraries") | ||
| parser.add_argument('--no_media_ndk', action="store_true", help="Do not link Media NDK (required for video I/O support)") | ||
| parser.add_argument('--disable', metavar='FEATURE', default=[], action='append', help='OpenCV features to disable (add WITH_*=OFF). To disable multiple, specify this flag again, e.g. "--disable tbb --disable openmp"') |
platforms/android/build_sdk.py
Outdated
| cmake_vars['WITH_ANDROID_MEDIANDK'] = "OFF" | ||
|
|
||
| if len(self.disable) > 0: | ||
| cmd.extend(["-DWITH_%s=OFF" % f for f in self.disable]) |
Contributor
There was a problem hiding this comment.
Use cmake_vars instead.
May be even after this line: cmake_vars.update(abi.cmake_vars)
Contributor
Author
|
thanks for the review! made changes following the comments. |
Contributor
Author
|
@opencv-alalek ready to merge? |
opencv-alalek
approved these changes
Mar 27, 2024
Contributor
opencv-alalek
left a comment
There was a problem hiding this comment.
LGTM 👍 Thank you for contribution!
Merged
klatism
added a commit
to klatism/opencv
that referenced
this pull request
May 17, 2024
…ancement Add component disable flag to android build opencv#25190 Adding --disable flag to android sdk build script. The flag allows to exclude components from build by concatting -DWITH_XXX cmake flag to the build command. Example : --disable OPENEXR (uppercase). - [X] I agree to contribute to the project under Apache 2 License. - [X] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [X] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding --disable flag to android sdk build script. The flag allows to exclude components from build by concatting -DWITH_XXX cmake flag to the build command. Example : --disable OPENEXR (uppercase).
Patch to opencv_extra has the same branch name.