Skip to content

Commit 2a7705d

Browse files
authored
[Bug Fix] fix libomp.so not found error (#715)
* [Android] Add VisSegmentation NEON support * [ARM] change vqaddq_u8 -> vaddq_u8 * [ARM] change vqaddq_u8 -> vaddq_u8 * [Bug Fix] add FDASSERT * update assert info * add QuantizeBlendingWeight8 * Update QuantizeBlendingWeight8 * Update VisSegmentation * [Visualize] add DefaultVisualizeType and EnableFastVisuzlie * fix typos * fix typo * Update VisSegmentation * [Android] Add omp parallel support for Android * Add omp schedule(static) * [Bug Fix] fix libomp.so not found error
1 parent 9503639 commit 2a7705d

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ option(WITH_TESTING "Whether to compile with unittest." OFF)
6868
############################# Options for Android cross compiling #########################
6969
option(WITH_OPENCV_STATIC "Use OpenCV static lib for Android." OFF)
7070
option(WITH_LITE_STATIC "Use Paddle Lite static lib for Android." OFF)
71+
option(WITH_OPENMP "Use OpenMP support for Android." OFF)
7172

7273
# Please don't open this flag now, some bugs exists.
7374
# Only support Linux Now
@@ -489,12 +490,15 @@ if(MSVC)
489490
target_compile_options(${LIBRARY_NAME} PRIVATE "$<$<BUILD_INTERFACE:$<COMPILE_LANGUAGE:CXX>>:/wd4251>$<$<BUILD_INTERFACE:$<COMPILE_LANGUAGE:CUDA>>:-Xcompiler=/wd4251>")
490491
endif()
491492

492-
if (ANDROID)
493+
# extra depend libs for android
494+
if(ANDROID)
493495
find_library(log-lib log)
494496
list(APPEND DEPEND_LIBS ${log-lib})
495-
find_package(OpenMP)
496-
if(OpenMP_CXX_FOUND)
497-
list(APPEND DEPEND_LIBS OpenMP::OpenMP_CXX)
497+
if(WITH_OPENMP)
498+
find_package(OpenMP)
499+
if(OpenMP_CXX_FOUND)
500+
list(APPEND DEPEND_LIBS OpenMP::OpenMP_CXX)
501+
endif()
498502
endif()
499503
endif()
500504

java/android/fastdeploy/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ android {
3131
version "3.10.2"
3232
}
3333
}
34+
sourceSets {
35+
main {
36+
jniLibs.srcDirs = ['libs']
37+
}
38+
}
3439
ndkVersion '20.1.5948944'
3540
}
3641

0 commit comments

Comments
 (0)