Skip to content

android : update CMakeLists.txt to use FetchContent for ggml #3268

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 2 commits into from
Jun 19, 2025

Conversation

danbev
Copy link
Collaborator

@danbev danbev commented 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: #3265 (comment)

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
Copy link
Collaborator Author

danbev commented Jun 19, 2025

I'm working on whisper.android.java and attempting something similar, but it was not as straight forward as the Kotlin version as the version of cmake does not support FetchContent.

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.
@danbev danbev requested a review from ggerganov June 19, 2025 11:25
@danbev danbev merged commit 3e65f51 into ggml-org:master Jun 19, 2025
103 of 104 checks passed
@danbev danbev deleted the android-cmake-ggml branch June 19, 2025 14:09
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