opencv-3.4.1-remove-git-autodetect.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --- a/CMakeLists.txt 2019-01-10 19:29:06.831367707 +0100
  2. +++ b/CMakeLists.txt 2019-01-10 19:30:11.125364384 +0100
  3. @@ -522,23 +522,23 @@
  4. # ----------------------------------------------------------------------------
  5. # Autodetect if we are in a GIT repository
  6. # ----------------------------------------------------------------------------
  7. -find_host_package(Git QUIET)
  8. +# find_host_package(Git QUIET)
  9. -if(NOT DEFINED OPENCV_VCSVERSION AND GIT_FOUND)
  10. - execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tags --always --dirty --match "[0-9].[0-9].[0-9]*"
  11. - WORKING_DIRECTORY "${OpenCV_SOURCE_DIR}"
  12. - OUTPUT_VARIABLE OPENCV_VCSVERSION
  13. - RESULT_VARIABLE GIT_RESULT
  14. - ERROR_QUIET
  15. - OUTPUT_STRIP_TRAILING_WHITESPACE
  16. - )
  17. - if(NOT GIT_RESULT EQUAL 0)
  18. - set(OPENCV_VCSVERSION "unknown")
  19. - endif()
  20. -elseif(NOT DEFINED OPENCV_VCSVERSION)
  21. - # We don't have git:
  22. - set(OPENCV_VCSVERSION "unknown")
  23. -endif()
  24. +# if(NOT DEFINED OPENCV_VCSVERSION AND GIT_FOUND)
  25. +# execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tags --always --dirty --match "[0-9].[0-9].[0-9]*"
  26. +# WORKING_DIRECTORY "${OpenCV_SOURCE_DIR}"
  27. +# OUTPUT_VARIABLE OPENCV_VCSVERSION
  28. +# RESULT_VARIABLE GIT_RESULT
  29. +# ERROR_QUIET
  30. +# OUTPUT_STRIP_TRAILING_WHITESPACE
  31. +# )
  32. +# if(NOT GIT_RESULT EQUAL 0)
  33. +# set(OPENCV_VCSVERSION "unknown")
  34. +# endif()
  35. +# elseif(NOT DEFINED OPENCV_VCSVERSION)
  36. +# # We don't have git:
  37. +# set(OPENCV_VCSVERSION "unknown")
  38. +#endif()
  39. # ----------------------------------------------------------------------------