mirror of https://github.com/opencv/opencv.git
Merge pull request #23724 from dkurt:java_without_ant
Build Java without ANT #23724 ### Pull Request Readiness Checklist Enables a path of building Java bindings without ANT * Able to build OpenCV JAR and Docs without ANT ``` -- Java: -- ant: NO -- JNI: /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include/linux /usr/lib/jvm/default-java/include -- Java wrappers: YES -- Java tests: NO ``` * Possible to build OpenCV JAR without ANT but tests still require ANT **Merge with**: https://github.com/opencv/opencv_contrib/pull/3502 Notes: - Use `OPENCV_JAVA_IGNORE_ANT=1` to force "Java" flow for building Java bindings - Java tests still require Apache ANT - JAR doesn't include `.java` source code files. See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMakepull/23821/head
parent
ec95efca10
commit
433c364456
7 changed files with 130 additions and 31 deletions
@ -0,0 +1,5 @@ |
||||
Specification-Title: OpenCV |
||||
Specification-Version: @OPENCV_VERSION@ |
||||
Implementation-Title: OpenCV |
||||
Implementation-Version: @OPENCV_VCSVERSION@ |
||||
Implementation-Date: @OPENCV_TIMESTAMP@ |
@ -0,0 +1,19 @@ |
||||
file(GLOB_RECURSE java_sources "${OPENCV_JAVA_DIR}/*.java") |
||||
|
||||
set(__sources "") |
||||
|
||||
foreach(dst ${java_sources}) |
||||
set(__sources "${__sources}${dst}\n") |
||||
endforeach() |
||||
|
||||
function(ocv_update_file filepath content) |
||||
if(EXISTS "${filepath}") |
||||
file(READ "${filepath}" actual_content) |
||||
else() |
||||
set(actual_content "") |
||||
endif() |
||||
if(NOT ("${actual_content}" STREQUAL "${content}")) |
||||
file(WRITE "${filepath}" "${content}") |
||||
endif() |
||||
endfunction() |
||||
ocv_update_file("${OUTPUT}" "${__sources}") |
Loading…
Reference in new issue