build 3.4 static library for android, but get so [closed]

asked 2019-01-27 04:14:26 -0600

tonghu gravatar image

I git clone the 3.4 branch to local, create a build_arm_android folder, and use the command cmake -DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake -DDBUILD_SHARED_LIBS=OFF -DBUILD_ZLIB=ON -DCMAKE_BUILD_TYPE=RELEASE -DANDROID_ABI=armeabi-v7a .. then make to build.

But the generate file is still libopencv_java4.so, how can I build static library? the cmakeorder's output is https://gist.github.com/huhuang03/c0a...

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by tonghu
close date 2019-01-28 22:41:59.062292

Comments

-DDBUILD_SHARED_LIBS=OFF means, that no other opencv so's (like opencv_core, opencv_imgproc) are built, but statically lnked into the libopencv_java4.so

berak gravatar imageberak ( 2019-01-27 04:17:25 -0600 )edit