summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-04-18 13:29:26 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-05-17 11:06:01 -0700
commita61d5345fbd560a307508300ad8181eda35f90c8 (patch)
treece01abe6d7f1b57057c8508404a361aefe22b8d0
parent9efb2ba784cb64e542b63a9b42f7a48bcfd44672 (diff)
meson: fix gallium-osmesa to build for windows
-rw-r--r--src/gallium/state_trackers/osmesa/meson.build12
-rw-r--r--src/gallium/targets/osmesa/meson.build9
2 files changed, 18 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/osmesa/meson.build b/src/gallium/state_trackers/osmesa/meson.build
index 912a6226f7..26ec8084f9 100644
--- a/src/gallium/state_trackers/osmesa/meson.build
+++ b/src/gallium/state_trackers/osmesa/meson.build
@@ -1,4 +1,4 @@
-# Copyright © 2017 Intel Corporation
+# Copyright © 2017-2018 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -18,10 +18,18 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
+osmesa_st_c_args = []
+if with_platform_windows
+ osmesa_st_c_args += ['-DBUILD_GL32', '-DWIN32_LEAN_AND_MEAN']
+ if not with_gles1
+ osmesa_st_c_args += ['-D_GLAPI_NO_EXPORTS']
+ endif
+endif
+
libosmesa_st = static_library(
'osmesa_st',
'osmesa.c',
- c_args : ['-DGALLIUM_SOFTPIPE'],
+ c_args : osmesa_st_c_args,
include_directories : [
inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_mapi, inc_mesa,
],
diff --git a/src/gallium/targets/osmesa/meson.build b/src/gallium/targets/osmesa/meson.build
index b4ae8f4b6e..1e866124b1 100644
--- a/src/gallium/targets/osmesa/meson.build
+++ b/src/gallium/targets/osmesa/meson.build
@@ -32,12 +32,19 @@ if with_ld_version_script
osmesa_link_deps += files('osmesa.sym')
endif
+if cc.get_id() == 'gcc' and host_machine.cpu_family() != 'x86_64'
+ osmesa_def = 'osmesa.mingw.def'
+else
+ osmesa_def = 'osmesa.def'
+endif
+
libosmesa = shared_library(
osmesa_lib_name,
'target.c',
c_args : [c_vis_args],
cpp_args : cpp_vis_args,
link_args : [ld_args_gc_sections, osmesa_link_args],
+ vs_module_defs : osmesa_def,
include_directories : [
inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_gallium_winsys,
inc_gallium_drivers,
@@ -48,7 +55,7 @@ libosmesa = shared_library(
libmesa_gallium, libgallium, libglapi_static, libws_null, osmesa_link_with,
],
dependencies : [
- dep_selinux, dep_thread, dep_clock, dep_unwind,
+ dep_ws2_32, dep_selinux, dep_thread, dep_clock, dep_unwind,
driver_swrast, driver_swr,
],
version : '8.0.0',