diff options
author | Dylan Baker <[email protected]> | 2018-04-18 13:23:48 -0700 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2019-10-10 16:33:04 -0700 |
commit | 2a53a06793ac696b2566e38174e02e83583f6495 (patch) | |
tree | 0e2c3a157105a5ac5b05e32320ac5c01e10bf1d7 /src | |
parent | 2e17348600d50501f837d0ad5ef6570212672555 (diff) |
meson: Add necessary defines for mesa_gallium on windows
v4: - Retain scons comments for windows specific defines
v5: - key GLAPI_NO_EXPORTS off of shared-glapi instead of gles
Acked-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/meson.build | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/mesa/meson.build b/src/mesa/meson.build index 563bdd7c103..fa5c54cc6fb 100644 --- a/src/mesa/meson.build +++ b/src/mesa/meson.build @@ -720,11 +720,23 @@ libmesa_classic = static_library( build_by_default : false, ) +_mesa_gallium_args = [] +if with_platform_windows + _mesa_gallium_args += [ + '-D_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers + '-DBUILD_GL32' # declare gl* as __declspec(dllexport) in Mesa headers + ] + if not with_shared_glapi + # prevent _glapi_* from being declared __declspec(dllimport) + _mesa_gallium_args += '-D_GLAPI_NO_EXPORTS' + endif +endif + libmesa_gallium = static_library( 'mesa_gallium', [files_libmesa_common, files_libmesa_gallium], - c_args : [c_vis_args, c_msvc_compat_args], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args], + c_args : [c_vis_args, c_msvc_compat_args, _mesa_gallium_args], + cpp_args : [cpp_vis_args, cpp_msvc_compat_args, _mesa_gallium_args], include_directories : [inc_common, inc_libmesa_asm, include_directories('main')], link_with : [libglsl, libmesa_sse41], dependencies : [idep_nir_headers, dep_vdpau], |