opencv-mobile icon indicating copy to clipboard operation
opencv-mobile copied to clipboard

How to build custom sdk?

Open maciek-s opened this issue 3 months ago • 1 comments

Hi, I follow this steps https://github.com/nihui/opencv-mobile?tab=readme-ov-file#how-to-build-your-custom-package to build custom package with opencv_calib3d, so I only change -DBUILD_opencv_calib3d=ON in options.txt. How can I now create a zip that looks like the Android one in the releases?

maciek-s avatar Sep 26 '25 19:09 maciek-s

Hi @maciek-s! I'm Dosu and I’m helping the opencv-mobile team.

After you build and install your custom OpenCV package (with -DBUILD_opencv_calib3d=ON in options.txt), just zip the entire install directory that CMake creates. This matches the structure of the official Android release ZIPs. For example, from your build directory, run:

zip -r -9 opencv-mobile-<version>-custom.zip install

The resulting ZIP will contain the headers, libraries, and CMake config files in the same layout as the official Android packages. You can then use it in your Android project as described in the README: extract it to your JNI directory and update your CMakeLists.txt to point to the SDK native jni path reference.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

dosubot[bot] avatar Sep 26 '25 19:09 dosubot[bot]