Skip to content

Commit 512cb4f

Browse files
committed
Correction to enable compilation on platform with only GTK2 libs
modified: CMakeLists.txt modified: cmake/OpenCVFindLibsGUI.cmake
1 parent 8fd11f4 commit 512cb4f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -749,14 +749,14 @@ else()
749749
endif()
750750
else()
751751
if(HAVE_GTK3)
752-
status(" GTK+ 3.x:" HAVE_GTK THEN "YES (ver ${ALIASOF_gtk+-3.0_VERSION})" ELSE NO)
752+
status(" GTK+ 3.x:" HAVE_GTK THEN "YES (ver ${ALIASOF_gtk+-3.0_VERSION})" ELSE NO)
753753
elseif(HAVE_GTK)
754-
status(" GTK+ 2.x:" HAVE_GTK THEN "YES (ver ${ALIASOF_gtk+-2.0_VERSION})" ELSE NO)
754+
status(" GTK+ 2.x:" HAVE_GTK THEN "YES (ver ${ALIASOF_gtk+-2.0_VERSION})" ELSE NO)
755755
else()
756-
status(" GTK+:" NO)
756+
status(" GTK+:" NO)
757757
endif()
758-
status(" GThread :" HAVE_GTHREAD THEN "YES (ver ${ALIASOF_gthread-2.0_VERSION})" ELSE NO)
759-
status(" GtkGlExt:" HAVE_GTKGLEXT THEN "YES (ver ${ALIASOF_gtkglext-1.0_VERSION})" ELSE NO)
758+
status(" GThread :" HAVE_GTHREAD THEN "YES (ver ${ALIASOF_gthread-2.0_VERSION})" ELSE NO)
759+
status(" GtkGlExt:" HAVE_GTKGLEXT THEN "YES (ver ${ALIASOF_gtkglext-1.0_VERSION})" ELSE NO)
760760
endif()
761761
endif()
762762
endif()

cmake/OpenCVFindLibsGUI.cmake

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ ocv_clear_vars(HAVE_GTK HAVE_GTK3 HAVE_GTHREAD HAVE_GTKGLEXT)
4343
if(WITH_GTK AND NOT HAVE_QT)
4444
if(NOT WITH_GTK_2_X)
4545
CHECK_MODULE(gtk+-3.0 HAVE_GTK3)
46-
set(HAVE_GTK HAVE_GTK3)
46+
if(HAVE_GTK3)
47+
set(HAVE_GTK TRUE)
48+
endif()
4749
endif()
4850
if(NOT HAVE_GTK)
4951
CHECK_MODULE(gtk+-2.0 HAVE_GTK)

0 commit comments

Comments
 (0)