mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 09:25:45 +08:00
highgui: Set hard GLib requirement to >=2.32
This version has been released 10 years ago.
This commit is contained in:
parent
76350cd30f
commit
f1f14ce403
@ -20,7 +20,7 @@ if(WITH_GTK)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
ocv_check_modules(GTHREAD gthread-2.0)
|
||||
ocv_check_modules(GTHREAD gthread-2.0>=2.32)
|
||||
if(HAVE_GTK AND NOT HAVE_GTHREAD)
|
||||
message(FATAL_ERROR "gthread not found. This library is required when building with GTK support")
|
||||
else()
|
||||
|
@ -659,14 +659,6 @@ CV_IMPL int cvStartWindowThread(){
|
||||
cvInitSystem(0,NULL);
|
||||
if (!thread_started)
|
||||
{
|
||||
#if !GLIB_CHECK_VERSION(2, 32, 0) // https://github.com/GNOME/glib/blame/b4d58a7105bb9d75907233968bb534b38f9a6e43/glib/deprecated/gthread.h#L274
|
||||
if (!g_thread_supported ())
|
||||
{
|
||||
/* the GThread system wasn't inited, so init it */
|
||||
g_thread_init(NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
(void)getWindowMutex(); // force mutex initialization
|
||||
|
||||
// protects the 'last key pressed' variable
|
||||
@ -675,13 +667,7 @@ CV_IMPL int cvStartWindowThread(){
|
||||
// conditional that indicates a key has been pressed
|
||||
cond_have_key = g_cond_new();
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 32, 0)
|
||||
// this is the window update thread
|
||||
window_thread = g_thread_create(icvWindowThreadLoop,
|
||||
NULL, TRUE, NULL);
|
||||
#else
|
||||
window_thread = g_thread_new("OpenCV window update", icvWindowThreadLoop, NULL);
|
||||
#endif
|
||||
}
|
||||
thread_started = window_thread!=NULL;
|
||||
return thread_started;
|
||||
|
Loading…
Reference in New Issue
Block a user