From 2122cde787909f4e64d750d06a61cc5400c0b67a Mon Sep 17 00:00:00 2001 From: Yannick Verdie Date: Tue, 27 Jul 2010 13:19:29 +0000 Subject: [PATCH] --- CMakeLists.txt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17f496d35..c9b5729d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -516,14 +516,20 @@ if (WITH_QT) find_package(Qt4) if (QT4_FOUND) set(HAVE_QT 1) + find_package (OpenGL QUIET) + #Qt 4.6 is the minimum for OpenGL + if (QT_QTOPENGL_FOUND AND OPENGL_FOUND AND QT_VERSION_MINOR GREATER 5) + set(HAVE_QT_OPENGL 1) + add_definitions(-DHAVE_QT_OPENGL) + endif() #add_definitions(-DHAVE_QT) set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS "HAVE_QT") - #find_package (OpenGL QUIET) - #if (QT_QTOPENGL_FOUND AND OPENGL_FOUND) - # set(HAVE_QT_OPENGL 1) - # add_definitions(-DHAVE_QT_OPENGL) - #endif() + find_package (OpenGL QUIET) + if (QT_QTOPENGL_FOUND AND OPENGL_FOUND) + set(HAVE_QT_OPENGL 1) + add_definitions(-DHAVE_QT_OPENGL) + endif() endif() endif()