mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
highgui: cleanup and fixes
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
# --- GTK ---
|
||||
ocv_clear_vars(HAVE_GTK HAVE_GTK3 HAVE_GTHREAD HAVE_GTKGLEXT)
|
||||
if(WITH_GTK AND NOT HAVE_QT)
|
||||
if(WITH_GTK)
|
||||
if(NOT WITH_GTK_2_X)
|
||||
ocv_check_modules(GTK3 gtk+-3.0)
|
||||
if(HAVE_GTK3)
|
||||
ocv_add_external_target(gtk3 "${GTK3_INCLUDE_DIRS}" "${GTK3_LIBRARIES}" "HAVE_GTK3;HAVE_GTK")
|
||||
set(HAVE_GTK TRUE)
|
||||
set(HAVE_GTK3 ${HAVE_GTK3} PARENT_SCOPE)
|
||||
set(GTK3_VERSION "${GTK3_VERSION}" PARENT_SCOPE) # informational
|
||||
endif()
|
||||
endif()
|
||||
if(TRUE)
|
||||
if((PROJECT_NAME STREQUAL "OpenCV" AND HIGHGUI_ENABLE_PLUGINS) OR NOT HAVE_GTK3)
|
||||
ocv_check_modules(GTK2 gtk+-2.0)
|
||||
if(HAVE_GTK2)
|
||||
set(MIN_VER_GTK "2.18.0")
|
||||
@@ -18,6 +19,7 @@ if(WITH_GTK AND NOT HAVE_QT)
|
||||
else()
|
||||
ocv_add_external_target(gtk2 "${GTK2_INCLUDE_DIRS}" "${GTK2_LIBRARIES}" "HAVE_GTK2;HAVE_GTK")
|
||||
set(HAVE_GTK TRUE)
|
||||
set(HAVE_GTK2 ${HAVE_GTK2} PARENT_SCOPE)
|
||||
set(GTK2_VERSION "${GTK2_VERSION}" PARENT_SCOPE) # informational
|
||||
endif()
|
||||
endif()
|
||||
@@ -38,7 +40,8 @@ if(WITH_GTK AND NOT HAVE_QT)
|
||||
set(GTKGLEXT_VERSION "${GTKGLEXT_VERSION}" PARENT_SCOPE) # informational
|
||||
endif()
|
||||
endif()
|
||||
elseif(HAVE_GTK)
|
||||
ocv_add_external_target(gtk "${GTK_INCLUDE_DIRS}" "${GTK_LIBRARIES}" "${GTK_DEFINES};HAVE_GTK")
|
||||
endif()
|
||||
|
||||
set(HAVE_GTK ${HAVE_GTK} PARENT_SCOPE)
|
||||
set(HAVE_GTK3 ${HAVE_GTK3} PARENT_SCOPE)
|
||||
|
||||
Reference in New Issue
Block a user