From cb4fffc72a7e811803ed036d473f446237264908 Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 10 Apr 2014 23:28:23 +0100 Subject: [PATCH] Fix logic error in OpenCVFindLibsGUI.cmake When with_gtk is selected but GTK3 is not present the current logic fails to check for GTK2. This edit corrects this. --- cmake/OpenCVFindLibsGUI.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/OpenCVFindLibsGUI.cmake b/cmake/OpenCVFindLibsGUI.cmake index f44261c..05de58c 100644 --- a/cmake/OpenCVFindLibsGUI.cmake +++ b/cmake/OpenCVFindLibsGUI.cmake @@ -44,7 +44,8 @@ if(WITH_GTK AND NOT HAVE_QT) if(NOT WITH_GTK_2_X) CHECK_MODULE(gtk+-3.0 HAVE_GTK3) set(HAVE_GTK HAVE_GTK3) - else() + endif() + if(NOT HAVE_GTK) CHECK_MODULE(gtk+-2.0 HAVE_GTK) if(HAVE_GTK AND (ALIASOF_gtk+-2.0_VERSION VERSION_LESS MIN_VER_GTK)) message (FATAL_ERROR "GTK support requires a minimum version of ${MIN_VER_GTK} (${ALIASOF_gtk+-2.0_VERSION} found)") -- 2.7.4