Fix the build on armhf/aarch64

Summary:
qopengl.h redeclares the functions defined in the epoxy/gl.h and it
results in the build error. this is similar to other .cpp files where
epoxy/gl.h is used.

See: https://build.neon.kde.org/job/xenial_unstable_plasma_kwin_bin_armhf/157

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D10762
This commit is contained in:
Bhushan Shah 2018-03-06 09:25:13 +05:30
parent 68a2ec5d63
commit 3fa287280b
6 changed files with 47 additions and 0 deletions

37
fixqopengl.h Normal file
View file

@ -0,0 +1,37 @@
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2018 Bhushan Shah <bshah@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#ifndef FIXQOPENGL_H
#define FIXQOPENGL_H
// qopengl.h declares GLdouble as a typedef of float when Qt is built
// with GLES support. This conflicts with the epoxy/gl_generated.h
// declaration, so we have to prevent the Qt header from being #included.
#define QOPENGL_H
#ifndef QOPENGLF_APIENTRY
#define QOPENGLF_APIENTRY GLAPIENTRY
#endif
#ifndef QOPENGLF_APIENTRYP
#define QOPENGLF_APIENTRYP GLAPIENTRYP
#endif
#endif //FIXQOPENGL_H

View file

@ -19,6 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "kwinglplatform.h"
// include kwinglutils_funcs.h to avoid the redeclaration issues
// between qopengl.h and epoxy/gl.h
#include "kwinglutils_funcs.h"
#include <epoxy/gl.h>
#include <QRegExp>

View file

@ -22,6 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kwin_export.h>
#include <kwinglobals.h>
#include <epoxy/egl.h>
#include "fixqopengl.h"
#include <fixx11h.h>
#include <QImage>
#include <QObject>

View file

@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KWIN_QPA_ABSTRACTPLATFORMCONTEXT_H
#include <epoxy/egl.h>
#include "fixqopengl.h"
#include <fixx11h.h>
#include <qpa/qplatformopenglcontext.h>

View file

@ -21,6 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KWIN_QPA_INTEGRATION_H
#include <epoxy/egl.h>
#include "fixqopengl.h"
#include <fixx11h.h>
#include <qpa/qplatformintegration.h>
#include <QObject>

View file

@ -21,6 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KWIN_QPA_WINDOW_H
#include <epoxy/egl.h>
#include "fixqopengl.h"
#include <fixx11h.h>
#include <qpa/qplatformwindow.h>
// wayland