Fixed build issue when using GLEW with MSVC

MSVC does not support the #warning precompiler command and
is considered an error when used. This change checks for
GCC before issuing the warning.

Change-Id: Iee1e27841fe77b0289e88b7b4ccaa176ab56a39d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
Andy Nichols 2012-04-08 15:50:02 +02:00 committed by Qt by Nokia
parent 673ce6c84e
commit 2756101d0e
3 changed files with 6 additions and 0 deletions

View File

@ -51,9 +51,11 @@
#include <QtGui/QSurfaceFormat>
#ifdef __GLEW_H__
#if defined(Q_CC_GNU)
#warning qopenglfunctions.h is not compatible with GLEW, GLEW defines will be undefined
#warning To use GLEW with Qt, do not include <qopengl.h> or <QOpenGLFunctions> after glew.h
#endif
#endif
#include <QtGui/qopengl.h>

View File

@ -45,9 +45,11 @@
#ifndef QT_NO_OPENGL
#ifdef __GLEW_H__
#if defined(Q_CC_GNU)
#warning qopenglfunctions.h is not compatible with GLEW, GLEW defines will be undefined
#warning To use GLEW with Qt, do not include <qopengl.h> or <QOpenGLFunctions> after glew.h
#endif
#endif
#include <QtGui/qopengl.h>
#include <QtGui/qopenglcontext.h>

View File

@ -43,9 +43,11 @@
#define QGLFUNCTIONS_H
#ifdef __GLEW_H__
#if defined(Q_CC_GNU)
#warning qglfunctions.h is not compatible with GLEW, GLEW defines will be undefined
#warning To use GLEW with Qt, do not include <QtOpenGL> or <QGLFunctions> after glew.h
#endif
#endif
#include <QtOpenGL/qgl.h>
#include <QtGui/qopenglcontext.h>