aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/jni/CMakeLists.txt
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-08-16 17:24:47 +1200
committerArslaan Pathan <[email protected]>2026-08-16 17:24:47 +1200
commita8f8a47312a63b8e38d09b54311454e00e094ce9 (patch)
tree3f7b82a384528883c622ffa473c88fc6813797be /app/src/main/jni/CMakeLists.txt
parent4cd0d7b22d068f86233c6e349de76e55962ce805 (diff)
downloadmoku-assistant-a8f8a47312a63b8e38d09b54311454e00e094ce9.tar.xz
moku-assistant-a8f8a47312a63b8e38d09b54311454e00e094ce9.zip
[chore/migrate-cmake] Fix cmake config with native_app_glue and add proper vosk integration to CMakeLists.txt
Diffstat (limited to 'app/src/main/jni/CMakeLists.txt')
-rw-r--r--app/src/main/jni/CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
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
- $<LINK_LIBRARY:WHOLE_ARCHIVE,native_app_glue>
+ vosk
+ -Wl,--whole-archive native_app_glue -Wl,--no-whole-archive
log
)