mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
[FastTokenizer] Support FastTokenizer on Android (#783)
* [FastTokenizer] Support FastTokenizer on Android * [OMP] Add OMP bind_proc(close) policy * [Android] Add Lite support for UIE * [Android] Add VIS_SEG_OMP_NUM_THREADS
This commit is contained in:
+11
-4
@@ -210,11 +210,18 @@ endif()
|
||||
|
||||
if (ENABLE_TEXT)
|
||||
if(ANDROID)
|
||||
message(FATAL_ERROR "Not support fastdeploy text APIs with Android now!")
|
||||
if(NOT ANDROID_TOOLCHAIN MATCHES "clang")
|
||||
message(FATAL_ERROR "Currently, only support clang toolchain while cross compiling FastDeploy for Android with FastTokenizer, but found ${ANDROID_TOOLCHAIN}.")
|
||||
endif()
|
||||
add_library(core_tokenizers STATIC IMPORTED GLOBAL)
|
||||
set_property(TARGET core_tokenizers PROPERTY IMPORTED_LOCATION
|
||||
${CMAKE_CURRENT_LIST_DIR}/third_libs/install/fast_tokenizer/lib/${ANDROID_ABI}/libcore_tokenizers.so)
|
||||
list(APPEND FASTDEPLOY_LIBS core_tokenizers)
|
||||
else()
|
||||
# Add dependency libs later: Linux/Mac/Win/...
|
||||
find_library(FAST_TOKENIZER_LIB core_tokenizers ${CMAKE_CURRENT_LIST_DIR}/third_libs/install/fast_tokenizer/lib NO_DEFAULT_PATH)
|
||||
list(APPEND FASTDEPLOY_LIBS ${FAST_TOKENIZER_LIB})
|
||||
endif()
|
||||
# Add dependency libs later
|
||||
find_library(FAST_TOKENIZER_LIB core_tokenizers ${CMAKE_CURRENT_LIST_DIR}/third_libs/install/fast_tokenizer/lib NO_DEFAULT_PATH)
|
||||
list(APPEND FASTDEPLOY_LIBS ${FAST_TOKENIZER_LIB})
|
||||
list(APPEND FASTDEPLOY_INCS ${CMAKE_CURRENT_LIST_DIR}/third_libs/install/fast_tokenizer/include)
|
||||
list(APPEND FASTDEPLOY_INCS ${CMAKE_CURRENT_LIST_DIR}/third_libs/install/fast_tokenizer/third_party/include)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user