build: Work around duplicated define of APIENTRY

epoxy defines it if windows.h hasn't been included.
So include windows.h before epoxy.

See also https://github.com/anholt/libepoxy/issues/299
This commit is contained in:
Benjamin Otte 2024-10-21 05:59:53 +02:00
parent b5f9d98955
commit 591bc5edc0
4 changed files with 19 additions and 2 deletions

View File

@ -22,6 +22,11 @@
#include "gdkenums.h"
#include "gdktypes.h"
/* epoxy needs this, see https://github.com/anholt/libepoxy/issues/299 */
#ifdef GDK_WINDOWING_WIN32
#include <windows.h>
#endif
#include <epoxy/gl.h>
#ifdef GDK_RENDERING_VULKAN

View File

@ -21,6 +21,10 @@
#pragma once
#ifndef DONT_INCLUDE_LIBEPOXY
#ifdef GDK_WINDOWING_WIN32
/* epoxy needs this, see https://github.com/anholt/libepoxy/issues/299 */
#include <windows.h>
#endif
#include <epoxy/gl.h>
#include <epoxy/wgl.h>

View File

@ -20,10 +20,14 @@
#pragma once
#include <epoxy/gl.h>
#include <graphene.h>
#include <gdk/gdk.h>
#include <gsk/gsk.h>
#ifdef GDK_WINDOWING_WIN32
/* epoxy needs this, see https://github.com/anholt/libepoxy/issues/299 */
#include <windows.h>
#endif
#include <epoxy/gl.h>
#include <graphene.h>
G_BEGIN_DECLS

View File

@ -1,4 +1,8 @@
#include <gtk/gtk.h>
#ifdef GDK_WINDOWING_WIN32
/* epoxy needs this, see https://github.com/anholt/libepoxy/issues/299 */
#include <windows.h>
#endif
#include <epoxy/gl.h>
#include "gdk/gdktextureprivate.h"
#include "gdk/gdkglcontextprivate.h"