From a8f8a47312a63b8e38d09b54311454e00e094ce9 Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Sun, 16 Aug 2026 17:24:47 +1200 Subject: [chore/migrate-cmake] Fix cmake config with native_app_glue and add proper vosk integration to CMakeLists.txt --- app/src/main/jni/CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/jni/CMakeLists.txt b/app/src/main/jni/CMakeLists.txt index 66eceff..ccc1aff 100644 --- a/app/src/main/jni/CMakeLists.txt +++ b/app/src/main/jni/CMakeLists.txt @@ -11,10 +11,13 @@ android_ndk_import_module_native_app_glue() add_app_library(moku SHARED main.c) -find_package(vosk REQUIRED CONFIG) +add_library(vosk SHARED IMPORTED) +set_target_properties(vosk PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libvosk.so) + +target_include_directories(moku PRIVATE ${CMAKE_SOURCE_DIR}/src/main/jni/vosk/include) target_link_libraries(moku - vosk::vosk - $ + vosk + -Wl,--whole-archive native_app_glue -Wl,--no-whole-archive log ) -- cgit v1.2.3