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>bb10
parent
673ce6c84e
commit
2756101d0e
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue