Skip to content

Commit

Permalink
Change the path of the QNN library when building in termux environment
Browse files Browse the repository at this point in the history
  • Loading branch information
myan-o committed Aug 18, 2024
1 parent 11900f9 commit c6e26a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ggml/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,11 @@ if (GGML_QNN)
find_library(LOG_LIB log)
find_library(ANDROID_LIB android)
set(GGML_EXTRA_LIBS ${GGML_EXTRA_LIBS} ${LOG_LIB} ${ANDROID_LIB})
set(GGML_QNN_DEFAULT_LIB_SEARCH_PATH "\"/data/local/tmp/\"")
if (NOT DEFINED ENV{TERMUX_VERSION} OR "$ENV{TERMUX_VERSION}" STREQUAL "")
set(GGML_QNN_DEFAULT_LIB_SEARCH_PATH "\"/data/local/tmp/\"")
else()
set(GGML_QNN_DEFAULT_LIB_SEARCH_PATH "\"$ENV{PREFIX}/lib/\"")
endif()
else()
message(FATAL_ERROR "QNN now only available on Android")
endif()
Expand Down

0 comments on commit c6e26a3

Please sign in to comment.