I've built the opencv with cmake -DWITH_OPENGL=ON ..
, but the output of the cmake tell me the OpenGL supported is NO.
And I've checked the cmake cache to assure the WITH_OPENGL
is ON
.
The GUI used is GTK+ 3.0, and the libgtkglext1-dev is installed.
After reading the cmake script
cmake/OpenCVFindLibsGUI.cmake
, I've found the related cmake codes:For I use the GTK+ 3.0, so the statement marked with
MARK1
will not be executed, then the condition marked withMARK2
will be false. So the OpenGL package will not be loaded.I've also tried to force to call
CHECK_MODULE(gtkglext-1.0 HAVE_GTKGLEXT)
even whenHAVE_GTK3
is true, but I found compiling compiling error at last.So I update my building command as below
With
WITH_GTK_2_X
to be set on, the gtk2 is force to be used instead of gtk3.