mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2025-02-20 01:52:49 +00:00
meson: fix gallium-osmesa to build for windows
v2: - set so_version to '' (only affects windows) - always set lib prefix to 'lib', even on msvc v5: - key NO_EXPORTS on shared glapi instead of gles. Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
This commit is contained in:
parent
b97a341017
commit
597a063551
@ -1450,7 +1450,11 @@ if with_osmesa != 'none'
|
||||
if with_osmesa == 'gallium' and not with_gallium_softpipe
|
||||
error('OSMesa gallium requires gallium softpipe or llvmpipe.')
|
||||
endif
|
||||
osmesa_lib_name = 'OSMesa'
|
||||
if host_machine.system() == 'windows'
|
||||
osmesa_lib_name = 'osmesa'
|
||||
else
|
||||
osmesa_lib_name = 'OSMesa'
|
||||
endif
|
||||
osmesa_bits = get_option('osmesa-bits')
|
||||
if osmesa_bits != '8'
|
||||
if with_dri or with_glx != 'disabled'
|
||||
|
@ -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,9 +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_shared_glapi
|
||||
osmesa_st_c_args += ['-D_GLAPI_NO_EXPORTS']
|
||||
endif
|
||||
endif
|
||||
|
||||
libosmesa_st = static_library(
|
||||
'osmesa_st',
|
||||
'osmesa.c',
|
||||
c_args : osmesa_st_c_args,
|
||||
include_directories : [
|
||||
inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_mapi, inc_mesa,
|
||||
],
|
||||
|
@ -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,9 +55,10 @@ libosmesa = shared_library(
|
||||
libmesa_gallium, libgallium, 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,
|
||||
],
|
||||
soversion : host_machine.system() == 'windows' ? '' : '8',
|
||||
version : '8.0.0',
|
||||
install : true,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user