Skip to content

Commit e8ff9ec

Browse files
[Saliency] Enable Java/Android bindings by adding 'WRAP java' to CMake
Fixes #4016 This addresses the inability to use the `saliency` module in Android (Java/Kotlin) applications. When generated using `build_sdk.py`, the native library compiles, but the Java wrapper class (`org.opencv.saliency.Saliency`) is not generated. **Technical Fix:** The `ocv_define_module` macro in `modules/saliency/CMakeLists.txt` was missing the `java` flag in its `WRAP` parameter. **Change in `modules/saliency/CMakeLists.txt`:** # OLD ocv_define_module(saliency opencv_imgproc opencv_features2d WRAP python) # NEW ocv_define_module(saliency opencv_imgproc opencv_features2d WRAP python java)
1 parent 9ce410a commit e8ff9ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/saliency/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ endif()
44

55
set(the_description "Saliency API")
66

7-
ocv_define_module(saliency opencv_imgproc opencv_features2d WRAP python)
7+
ocv_define_module(saliency opencv_imgproc opencv_features2d WRAP python java)
88

99
ocv_warnings_disable(CMAKE_CXX_FLAGS -Woverloaded-virtual)

0 commit comments

Comments
 (0)