Path: blob/21.2-virgl/src/gallium/targets/osmesa/meson.build
4565 views
# Copyright © 2017 Intel Corporation12# Permission is hereby granted, free of charge, to any person obtaining a copy3# of this software and associated documentation files (the "Software"), to deal4# in the Software without restriction, including without limitation the rights5# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell6# copies of the Software, and to permit persons to whom the Software is7# furnished to do so, subject to the following conditions:89# The above copyright notice and this permission notice shall be included in10# all copies or substantial portions of the Software.1112# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR13# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,14# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE15# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER16# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,17# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE18# SOFTWARE.1920osmesa_link_with = []21osmesa_link_args = []22osmesa_link_deps = []2324if with_shared_glapi25osmesa_link_with += libglapi26endif27if with_ld_version_script28osmesa_link_args += [29'-Wl,--version-script', join_paths(meson.current_source_dir(), 'osmesa.sym')30]31osmesa_link_deps += files('osmesa.sym')32endif3334if cc.get_id() == 'gcc' and host_machine.cpu_family() != 'x86_64'35osmesa_def = 'osmesa.mingw.def'36else37osmesa_def = 'osmesa.def'38endif3940libosmesa = shared_library(41osmesa_lib_name,42'target.c',43gnu_symbol_visibility : 'hidden',44link_args : [ld_args_gc_sections, osmesa_link_args],45vs_module_defs : osmesa_def,46include_directories : [47inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_gallium_winsys,48inc_gallium_drivers,49],50link_depends : osmesa_link_deps,51link_whole : [libosmesa_st, libglapi_static],52link_with : [53libmesa_gallium, libgallium, libws_null, osmesa_link_with,54],55dependencies : [56dep_ws2_32, dep_selinux, dep_thread, dep_clock, dep_unwind,57driver_swrast, driver_swr, driver_virgl, driver_zink, idep_xmlconfig,58],59name_prefix : host_machine.system() == 'windows' ? '' : 'lib', # otherwise mingw will create libosmesa.dll60soversion : host_machine.system() == 'windows' ? '' : '8',61version : '8.0.0',62darwin_versions : '9.0.0',63install : true,64)6566pkg.generate(67name : 'osmesa',68description : 'Mesa Off-screen Rendering Library',69version : '8.0.0',70libraries : libosmesa,71libraries_private : gl_priv_libs,72)7374if with_tests75test('osmesa-render',76executable(77'osmesa-render',78'test-render.cpp',79include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],80link_with: libosmesa,81dependencies : [idep_gtest],82),83suite: 'gallium'84)85endif868788