Skip to content

cmake : fix android build #3265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 19, 2025
Merged

cmake : fix android build #3265

merged 4 commits into from
Jun 19, 2025

Conversation

ggerganov
Copy link
Member

cont #3264

ggerganov and others added 2 commits June 18, 2025 16:14
With these changes I was able to build the android examples locally.
@ggerganov
Copy link
Member Author

@danbev Thanks! We eventually have to fix the android build to use the existing CMake system instead of this ad hoc build approach:

# TODO: this needs to be updated to work with the new ggml CMakeLists

@ggerganov ggerganov marked this pull request as ready for review June 19, 2025 05:53
@danbev danbev merged commit 17bece1 into master Jun 19, 2025
50 checks passed
@ggerganov ggerganov deleted the gg/android-fix-build branch June 19, 2025 06:42
danbev added a commit to danbev/whisper.cpp that referenced this pull request Jun 19, 2025
This commit updates the CMakeLists.txt file for the Android Whisper
example to use FetchContent for managing the ggml library.

The motivation for this change is avoid having to make manual changes to
the CMakeLists.txt file after syncing the ggml library.

I've built and run the example locally to verify that it works as
expected.

Refs: ggml-org#3265 (comment)
danbev added a commit that referenced this pull request Jun 19, 2025
* android : update CMakeLists.txt to use FetchContent for ggml

This commit updates the CMakeLists.txt file for the Android Whisper
example to use FetchContent for managing the ggml library.

The motivation for this change is avoid having to make manual changes to
the CMakeLists.txt file after syncing the ggml library.

I've built and run the example locally to verify that it works as
expected.

Refs: #3265 (comment)

* android.java : update cmake to use FetchContent for ggml

This commit updates the CMake configuration for the Android Java example
to use `FetchContent` for including the `ggml` library. Do be able to
use FetchContent we also update the `compileSdkVersion` and
`targetSdkVersion` to 31, and the `buildToolsVersion` to '30.0.3'.
This also required a an update to the Gradle plugin version to 7.4.0.

The motivation for this change is avoid having to make manual changes to
the CMakeLists.txt file after syncing the ggml library.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants