blob: dda8e3ca1572e7adf94cb615a02094ce0a71690d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Tue, 31 Jan 2017 02:03:55 +0100
Subject: [PATCH] fix EPOXY_IMPORTEXPORT for static targets
Based on https://github.com/mxe/mxe/issues/1647#issuecomment-275967915
diff --git a/include/epoxy/gl.h b/include/epoxy/gl.h
index 1111111..2222222 100644
--- a/include/epoxy/gl.h
+++ b/include/epoxy/gl.h
@@ -71,7 +71,17 @@ extern "C" {
#endif
#ifndef EPOXY_IMPORTEXPORT
-#define EPOXY_IMPORTEXPORT __declspec(dllimport)
+# ifdef EPOXY_SHARED
+# ifdef EPOXY_DLL
+# define EPOXY_IMPORTEXPORT __declspec(dllexport)
+# else
+# define EPOXY_IMPORTEXPORT __declspec(dllimport)
+# endif
+# elif EPOXY_STATIC
+# define EPOXY_IMPORTEXPORT
+# else
+# error "Please define EPOXY_STATIC or EPOXY_SHARED"
+# endif
#endif
#ifndef GLAPI
|