mingw-opencv/opencv_mingw.patch
2022-01-03 14:00:16 +01:00

46 lines
2.0 KiB
Diff

diff -rupN opencv-4.5.5/modules/videoio/cmake/detect_gstreamer.cmake opencv-4.5.5-new/modules/videoio/cmake/detect_gstreamer.cmake
--- opencv-4.5.5/modules/videoio/cmake/detect_gstreamer.cmake 2021-12-25 04:53:27.000000000 +0100
+++ opencv-4.5.5-new/modules/videoio/cmake/detect_gstreamer.cmake 2022-01-03 12:20:55.876537130 +0100
@@ -44,6 +44,10 @@ if(NOT HAVE_GSTREAMER AND WIN32)
NAMES gstvideo gstvideo-1.0
PATHS ${env_paths}
PATH_SUFFIXES "lib")
+ find_library(GSTREAMER_audio_LIBRARY
+ NAMES gstvideo gstaudio-1.0
+ PATHS ${env_paths}
+ PATH_SUFFIXES "lib")
find_library(GSTREAMER_glib_LIBRARY
NAMES glib-2.0
@@ -63,6 +67,7 @@ if(NOT HAVE_GSTREAMER AND WIN32)
AND GSTREAMER_pbutils_LIBRARY
AND GSTREAMER_riff_LIBRARY
AND GSTREAMER_video_LIBRARY
+ AND GSTREAMER_audio_LIBRARY
AND GSTREAMER_glib_LIBRARY
AND GSTREAMER_gobject_LIBRARY)
file(STRINGS "${GSTREAMER_gst_INCLUDE_DIR}/gst/gstversion.h" ver_strings REGEX "#define +GST_VERSION_(MAJOR|MINOR|MICRO|NANO).*")
@@ -77,6 +82,7 @@ if(NOT HAVE_GSTREAMER AND WIN32)
${GSTREAMER_app_LIBRARY}
${GSTREAMER_riff_LIBRARY}
${GSTREAMER_video_LIBRARY}
+ ${GSTREAMER_audio_LIBRARY}
${GSTREAMER_pbutils_LIBRARY}
${GSTREAMER_glib_LIBRARY}
${GSTREAMER_gobject_LIBRARY})
diff -rupN opencv-4.5.5/modules/highgui/CMakeLists.txt opencv-4.5.5-new/modules/highgui/CMakeLists.txt
--- opencv-4.5.5/modules/highgui/CMakeLists.txt 2021-12-25 04:53:27.000000000 +0100
+++ opencv-4.5.5-new/modules/highgui/CMakeLists.txt 2022-01-03 12:45:17.022344393 +0100
@@ -150,6 +150,11 @@ elseif(HAVE_COCOA)
list(APPEND HIGHGUI_LIBRARIES "-framework Cocoa")
endif()
+if(MINGW)
+ list(APPEND HIGHGUI_LIBRARIES "opengl32")
+endif()
+
+
if(TARGET ocv.3rdparty.win32ui)
if("win32ui" IN_LIST HIGHGUI_PLUGIN_LIST OR HIGHGUI_PLUGIN_LIST STREQUAL "all")
ocv_create_builtin_highgui_plugin(opencv_highgui_win32 ocv.3rdparty.win32ui "window_w32.cpp")