Ask Your Question
0

Help to build only selected modules for android

asked 2018-09-30 20:13:31 -0600

rajeshrtmk gravatar image

I am trying to build *.so files for android modules which iam looking are core,imgproc and java files.

Below code works fine it generates java wrapper files which here is "libopencv_java400.so"

cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_LIST=${OPEN_CV_BUILD_MODULES} -D BUILD_ANDROID_PROJECTS=OFF -D WITH_FFMPEG=OFF -D WITH_IPP=OFF -D WITH_OPENEXR=OFF -D BUILD_EXAMPLES=OFF -D BUILD_ANDROID_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=OFF -D BUILD_DOCS=OFF -D BUILD_opencv_python2=OFF -D BUILD_opencv_python3=OFF -D BUILD_SHARED_LIBS=OFF -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF .. && make -j8

But when i run to generate for arm64 it doesnt generate java files and libopencv_java400.so file

cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D ANDROID=ON \
    -D ANDROID_ABI="arm64-v8a" \
    -D BUILD_LIST="imgproc,java" \
    -D BUILD_ANDROID_PROJECTS=OFF \
    -D BUILD_SHARED_LIBS=ON \
    -D CMAKE_TOOLCHAIN_FILE=../platforms/android/android.toolchain.cmake \
    -D ANDROID_NATIVE_API_LEVEL=19 \
    -D ANDROID_FORCE_ARM_BUILD=OFF \
    -D ANDROID_STL_FORCE_FEATURES=OFF \
    .. &&\
    make -j$NUM_CORES && \
    make install

Can any one share working cmake code to geneate.

Thank you

here is my dockerfile code

https://gist.githubusercontent.com/Ra...

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-10-01 01:15:29 -0600

berak gravatar image

updated 2018-10-01 01:17:10 -0600

you can't do without the core module, so your list should look like:

BUILD_LIST=core,imgproc,java

also take a close look at the cmake output. it's no use to start make, if it had errors there.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-09-30 20:13:31 -0600

Seen: 675 times

Last updated: Sep 30 '18