Repository navigation
Android build improvements - #13939
Merged
Merged
Conversation
* look for NDK in "ndk-bundle" directory under the SDK directory if location not specified * look for cmake and ninja in "cmake" directory under the SDK directory if not found in the path * disable use of ccache if not found in the path
alalek
reviewed
Mar 1, 2019
alalek
left a comment
Member
There was a problem hiding this comment.
Thank you for contribution!
What is about adding script parameter with force using of CMake/Ninja from Android SDK?
| files = [cmd] | ||
| else: | ||
| files = [cmd + ext for ext in pathext] | ||
| else: |
Member
There was a problem hiding this comment.
Code is not complete.
I believe we can use something like this instead:
def check_executable(cmd)
try:
retcode = subprocess.call(cmd, shell=shell)
if retcode < 0:
return False
return True
except:
return False
if not check_executable(['ninja', "--version"])
... fallback for manual searching ...
if not check_executable(['cmake', "--version"])
...
Contributor
Author
There was a problem hiding this comment.
Will add something like this and push a new commit
Contributor
Author
There was a problem hiding this comment.
Pushed a new commit to address this.
I tested the changes on Windows and Mac and they seem to work well
Contributor
Author
Might be a good idea - but probably something for a separate PR |
a-sajjad72
pushed a commit
to a-sajjad72/opencv
that referenced
this pull request
Mar 30, 2023
* Android build improvements * look for NDK in "ndk-bundle" directory under the SDK directory if location not specified * look for cmake and ninja in "cmake" directory under the SDK directory if not found in the path * disable use of ccache if not found in the path * Redo build tool existence checks
SavyaSanchi-Sharma
pushed a commit
to SavyaSanchi-Sharma/opencv
that referenced
this pull request
Jul 30, 2026
* Android build improvements * look for NDK in "ndk-bundle" directory under the SDK directory if location not specified * look for cmake and ninja in "cmake" directory under the SDK directory if not found in the path * disable use of ccache if not found in the path * Redo build tool existence checks
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.
This pullrequest changes platform/android/build_sdk.py