mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
Merge pull request #25865 from asmorkalov:as/gtk_2_opengl_fix
Hacked gtkglext search in cmake
This commit is contained in:
commit
9f5139b575
@ -29,7 +29,15 @@ if(WITH_GTK)
|
||||
if((WITH_OPENGL OR HAVE_OPENGL) AND HAVE_GTK2)
|
||||
ocv_check_modules(GTKGLEXT gtkglext-1.0)
|
||||
if(HAVE_GTKGLEXT)
|
||||
ocv_add_external_target(gtkglext "${GTKGLEXT_INCLUDE_DIRS}" "${GTKGLEXT_LIBRARIES}" "HAVE_GTKGLEXT")
|
||||
# HACK for https://github.com/opencv/opencv/issues/20850
|
||||
# pkg-config reports some include directories that do not exist. Just filter them out.
|
||||
set(GTKGLEXT_INCLUDE_DIRS_EXISTS "")
|
||||
foreach(p ${GTKGLEXT_INCLUDE_DIRS})
|
||||
if (EXISTS "${p}")
|
||||
list(APPEND GTKGLEXT_INCLUDE_DIRS_EXISTS "${p}")
|
||||
endif()
|
||||
endforeach()
|
||||
ocv_add_external_target(gtkglext "${GTKGLEXT_INCLUDE_DIRS_EXISTS}" "${GTKGLEXT_LIBRARIES}" "HAVE_GTKGLEXT")
|
||||
endif()
|
||||
endif()
|
||||
elseif(HAVE_GTK)
|
||||
|
Loading…
Reference in New Issue
Block a user