summaryrefslogtreecommitdiffstats
path: root/src/mapi/glapi
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2018-04-18 13:22:35 -0700
committerDylan Baker <[email protected]>2019-10-10 16:33:04 -0700
commit2e17348600d50501f837d0ad5ef6570212672555 (patch)
tree12b3836b10f3d5c6a9a97b75bb5303d12621bbe9 /src/mapi/glapi
parent3aee462781abc0bfcce207fb64f9199b43a57542 (diff)
meson: Add windows defines to glapi
These are needed to control the export or symbols due to differences between the way windows and *nix handle symbol exports. Reviewed-by: Eric Anholt <[email protected]> (v2) Acked-by: Kristian H. Kristensen <[email protected]> v5: - key NO_EXPORT off of shared-glapi instead of gles
Diffstat (limited to 'src/mapi/glapi')
-rw-r--r--src/mapi/glapi/meson.build13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mapi/glapi/meson.build b/src/mapi/glapi/meson.build
index 817dd57241d..1b8b685f207 100644
--- a/src/mapi/glapi/meson.build
+++ b/src/mapi/glapi/meson.build
@@ -25,7 +25,7 @@ inc_glapi = include_directories('.')
static_glapi_files = []
static_glapi_args = []
-if ['apple', 'windows'].contains(with_dri_platform)
+if with_dri and ['apple', 'windows'].contains(with_dri_platform)
static_glapi_files += [glapi_gentable_c, glapitable_h]
endif
@@ -46,8 +46,19 @@ if with_shared_glapi
'-DMAPI_ABI_HEADER="@0@"'.format(glapi_mapi_tmp_h.full_path()),
gcc_lto_quirk,
]
+ if with_platform_windows
+ static_glapi_args += ['-D_GDI32_', '-DBUILD_GL32']
+ endif
else
static_glapi_args += '-DMAPI_MODE_UTIL'
+ if with_platform_windows
+ static_glapi_args += ['-D_GDI32_', '-DBUILD_GL32', '-DKHRONOS_DLL_EXPORTS']
+ if with_shared_glapi
+ static_glapi_args += '-D_GLAPI_DLL_EXPORTS'
+ else
+ static_glapi_args += '-D_GLAPI_NO_EXPORTS'
+ endif
+ endif
static_glapi_files += files(
'glapi_dispatch.c',
'glapi_entrypoint.c',