File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ option(WITH_TESTING "Whether to compile with unittest." OFF)
68
68
############################# Options for Android cross compiling #########################
69
69
option (WITH_OPENCV_STATIC "Use OpenCV static lib for Android." OFF )
70
70
option (WITH_LITE_STATIC "Use Paddle Lite static lib for Android." OFF )
71
+ option (WITH_OPENMP "Use OpenMP support for Android." OFF )
71
72
72
73
# Please don't open this flag now, some bugs exists.
73
74
# Only support Linux Now
@@ -489,12 +490,15 @@ if(MSVC)
489
490
target_compile_options (${LIBRARY_NAME} PRIVATE "$<$<BUILD_INTERFACE:$<COMPILE_LANGUAGE:CXX>>:/wd4251>$<$<BUILD_INTERFACE:$<COMPILE_LANGUAGE:CUDA>>:-Xcompiler=/wd4251>" )
490
491
endif ()
491
492
492
- if (ANDROID )
493
+ # extra depend libs for android
494
+ if (ANDROID )
493
495
find_library (log -lib log )
494
496
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 ()
498
502
endif ()
499
503
endif ()
500
504
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ android {
31
31
version " 3.10.2"
32
32
}
33
33
}
34
+ sourceSets {
35
+ main {
36
+ jniLibs. srcDirs = [' libs' ]
37
+ }
38
+ }
34
39
ndkVersion ' 20.1.5948944'
35
40
}
36
41
You can’t perform that action at this time.
0 commit comments