From 76e631ba0eae63371b796dc2035e816122edb3b9 Mon Sep 17 00:00:00 2001 From: Martin Reboredo Date: Sun, 30 Jan 2022 20:08:03 -0300 Subject: [PATCH] Fix build failure in #764 --- Gui/Gui.pro | 9 +++++++-- Gui/GuiFwd.h | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Gui/Gui.pro b/Gui/Gui.pro index bda80d9691..0d27bb0b80 100644 --- a/Gui/Gui.pro +++ b/Gui/Gui.pro @@ -22,8 +22,13 @@ TEMPLATE = lib CONFIG += staticlib CONFIG += moc rcc CONFIG += boost opengl qt cairo python shiboken pyside -QT += gui core opengl network -greaterThan(QT_MAJOR_VERSION, 4): QT += concurrent +QT += gui core network + +greaterThan(QT_MAJOR_VERSION, 4) { + QT += concurrent +} else { + QT += opengl +} GUI_WRAPPER_DIR = Qt$${QT_MAJOR_VERSION}/NatronGui ENGINE_WRAPPER_DIR = Qt$${QT_MAJOR_VERSION}/NatronEngine diff --git a/Gui/GuiFwd.h b/Gui/GuiFwd.h index 511c16f9aa..0810859b30 100644 --- a/Gui/GuiFwd.h +++ b/Gui/GuiFwd.h @@ -49,7 +49,6 @@ class QFont; class QFontComboBox; class QFontMetrics; class QFrame; -class QOpenGLShaderProgram; class QGraphicsLineItem; class QGraphicsPolygonItem; class QGraphicsScene; @@ -95,6 +94,12 @@ class QWheelEvent; class QWidget; typedef boost::shared_ptr QUndoStackPtr; +#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) +class QOpenGLShaderProgram; +#else +typedef QGLShaderProgram QOpenGLShaderProgram; +#endif + // Natron Gui NATRON_NAMESPACE_ENTER class AboutWindow;