list_java_sources.cmake 490 B

12345678910111213141516171819
  1. file(GLOB_RECURSE java_sources "${OPENCV_JAVA_DIR}/*.java")
  2. set(__sources "")
  3. foreach(dst ${java_sources})
  4. set(__sources "${__sources}${dst}\n")
  5. endforeach()
  6. function(ocv_update_file filepath content)
  7. if(EXISTS "${filepath}")
  8. file(READ "${filepath}" actual_content)
  9. else()
  10. set(actual_content "")
  11. endif()
  12. if(NOT ("${actual_content}" STREQUAL "${content}"))
  13. file(WRITE "${filepath}" "${content}")
  14. endif()
  15. endfunction()
  16. ocv_update_file("${OUTPUT}" "${__sources}")