patch-modules_java_CMakeLists_txt 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. $OpenBSD: patch-modules_java_CMakeLists_txt,v 1.3 2015/01/30 21:38:37 zhuk Exp $
  2. 1. JNI shared object is installed in the same directory, so this should
  3. be under lib/.
  4. 2. Avoid exporting opencv_java together with other targets, unbreaks calling
  5. find_package(OpenCV) without opencv-java package being installed.
  6. --- modules/java/CMakeLists.txt.orig Wed Oct 1 11:33:36 2014
  7. +++ modules/java/CMakeLists.txt Thu Jan 29 21:20:33 2015
  8. @@ -280,7 +280,7 @@ else(ANDROID)
  9. if(WIN32)
  10. set(JAR_INSTALL_DIR java)
  11. else(WIN32)
  12. - set(JAR_INSTALL_DIR share/OpenCV/java)
  13. + set(JAR_INSTALL_DIR lib/OpenCV/java)
  14. endif(WIN32)
  15. install(FILES ${JAR_FILE} DESTINATION ${JAR_INSTALL_DIR} COMPONENT java)
  16. endif(ANDROID)
  17. @@ -357,11 +357,11 @@ if(ANDROID)
  18. ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT java)
  19. else()
  20. if(NOT INSTALL_CREATE_DISTRIB)
  21. - ocv_install_target(${the_module} EXPORT OpenCVModules
  22. + ocv_install_target(${the_module}
  23. RUNTIME DESTINATION ${JAR_INSTALL_DIR} COMPONENT java
  24. LIBRARY DESTINATION ${JAR_INSTALL_DIR} COMPONENT java)
  25. else()
  26. - ocv_install_target(${the_module} EXPORT OpenCVModules
  27. + ocv_install_target(${the_module}
  28. RUNTIME DESTINATION ${JAR_INSTALL_DIR}/${OpenCV_ARCH} COMPONENT java
  29. LIBRARY DESTINATION ${JAR_INSTALL_DIR}/${OpenCV_ARCH} COMPONENT java)
  30. endif()