opencv-4.8.0-fix-flatbuffer.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132
  1. --- a/modules/dnn/misc/tflite/schema_generated.h 2023-06-28 19:53:33.000000000 +0800
  2. +++ b/modules/dnn/misc/tflite/schema_generated.h 2023-08-24 15:17:19.594480034 +0800
  3. @@ -8,9 +8,9 @@
  4. // Ensure the included flatbuffers.h is the same version as when this file was
  5. // generated, otherwise it may not be compatible.
  6. -static_assert(FLATBUFFERS_VERSION_MAJOR == 23 &&
  7. - FLATBUFFERS_VERSION_MINOR == 5 &&
  8. - FLATBUFFERS_VERSION_REVISION == 9,
  9. +static_assert(FLATBUFFERS_VERSION_MAJOR == FLATBUFFERS_VERSION_MAJOR &&
  10. + FLATBUFFERS_VERSION_MINOR == FLATBUFFERS_VERSION_MINOR &&
  11. + FLATBUFFERS_VERSION_REVISION == FLATBUFFERS_VERSION_REVISION,
  12. "Non-compatible flatbuffers version included");
  13. namespace opencv_tflite {
  14. --- a/cmake/OpenCVDetectFlatbuffers.cmake 2023-08-24 15:31:50.129947159 +0800
  15. +++ b/cmake/OpenCVDetectFlatbuffers.cmake 2023-08-24 15:36:15.176705845 +0800
  16. @@ -1,9 +1,9 @@
  17. if(WITH_FLATBUFFERS)
  18. set(HAVE_FLATBUFFERS 1)
  19. - set(flatbuffers_VERSION "23.5.9")
  20. - ocv_install_3rdparty_licenses(flatbuffers "${OpenCV_SOURCE_DIR}/3rdparty/flatbuffers/LICENSE.txt")
  21. - ocv_add_external_target(flatbuffers "${OpenCV_SOURCE_DIR}/3rdparty/flatbuffers/include" "" "HAVE_FLATBUFFERS=1")
  22. - set(CUSTOM_STATUS_flatbuffers " Flatbuffers:" "builtin/3rdparty (${flatbuffers_VERSION})")
  23. + #set(flatbuffers_VERSION "23.5.9")
  24. + #ocv_install_3rdparty_licenses(flatbuffers "${OpenCV_SOURCE_DIR}/3rdparty/flatbuffers/LICENSE.txt")
  25. + #ocv_add_external_target(flatbuffers "${OpenCV_SOURCE_DIR}/3rdparty/flatbuffers/include" "" "HAVE_FLATBUFFERS=1")
  26. + #set(CUSTOM_STATUS_flatbuffers " Flatbuffers:" "builtin/3rdparty (${flatbuffers_VERSION})")
  27. endif()
  28. if(WITH_FLATBUFFERS OR HAVE_FLATBUFFERS)