From f0818c6725cf85329755d0675643fa4e7ec4a018 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 | 5 ++++- Gui/ViewerGLPrivate.h | 4 ++++ 3 files changed, 15 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..d9e127abad 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,10 @@ class QWheelEvent; class QWidget; typedef boost::shared_ptr QUndoStackPtr; +#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) +class QOpenGLShaderProgram; +#endif + // Natron Gui NATRON_NAMESPACE_ENTER class AboutWindow; diff --git a/Gui/ViewerGLPrivate.h b/Gui/ViewerGLPrivate.h index d89cf0ccb9..78eca6b118 100644 --- a/Gui/ViewerGLPrivate.h +++ b/Gui/ViewerGLPrivate.h @@ -42,6 +42,10 @@ CLANG_DIAG_ON(uninitialized) #include "Gui/ZoomContext.h" #include "Gui/GuiFwd.h" +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) +#include "Gui/QGLExtrasCompat.h" +#endif + #define WIPE_MIX_HANDLE_LENGTH 50. #define WIPE_ROTATE_HANDLE_LENGTH 100.