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.
This commit is contained in:
Tony 2014-04-10 23:28:23 +01:00
parent 47d4f8cd61
commit 8fd11f477b

View File

@ -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)")