Path: blob/21.2-virgl/src/virtio/vulkan/meson.build
4560 views
# Copyright 2019 Google LLC1# SPDX-License-Identifier: MIT2#3# based in part on anv and radv which are:4# Copyright © 2017 Intel Corporation56vn_entrypoints = custom_target(7'vn_entrypoints',8input : [vk_entrypoints_gen, vk_api_xml],9output : ['vn_entrypoints.h', 'vn_entrypoints.c'],10command : [11prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--proto', '--weak',12'--out-h', '@OUTPUT0@', '--out-c', '@OUTPUT1@', '--prefix', 'vn',13],14)1516virtio_icd = custom_target(17'virtio_icd',18input : [vk_icd_gen, vk_api_xml],19output : 'virtio_icd.@[email protected]'.format(host_machine.cpu()),20command : [21prog_python, '@INPUT0@',22'--api-version', '1.2', '--xml', '@INPUT1@',23'--lib-path', join_paths(get_option('prefix'), get_option('libdir'),24'libvulkan_virtio.so'),25'--out', '@OUTPUT@',26],27build_by_default : true,28install_dir : with_vulkan_icd_dir,29install : true,30)3132libvn_files = files(33'vn_buffer.c',34'vn_command_buffer.c',35'vn_common.c',36'vn_cs.c',37'vn_descriptor_set.c',38'vn_device.c',39'vn_device_memory.c',40'vn_icd.c',41'vn_image.c',42'vn_pipeline.c',43'vn_query_pool.c',44'vn_queue.c',45'vn_render_pass.c',46'vn_ring.c',47'vn_renderer_virtgpu.c',48'vn_renderer_vtest.c',49)5051vn_deps = [52dep_libdrm,53dep_thread,54idep_mesautil,55idep_vulkan_util,56idep_xmlconfig,57]5859vn_flags = [60no_override_init_args,61]6263vn_libs = []6465if with_platform_wayland or with_platform_x1166libvn_files += files('vn_wsi.c')67vn_flags += '-DVN_USE_WSI_PLATFORM'68vn_libs += libvulkan_wsi69endif7071if with_platform_wayland72libvn_files += files('vn_wsi_wayland.c')73vn_deps += dep_wayland_client74vn_flags += '-DVK_USE_PLATFORM_WAYLAND_KHR'75endif7677if with_platform_x1178libvn_files += files('vn_wsi_x11.c')79vn_deps += dep_xcb_dri380vn_flags += [81'-DVK_USE_PLATFORM_XCB_KHR',82'-DVK_USE_PLATFORM_XLIB_KHR',83]84endif8586if with_platform_android87libvn_files += files('vn_android.c')88vn_deps += dep_android89vn_flags += '-DVK_USE_PLATFORM_ANDROID_KHR'90endif9192libvulkan_virtio = shared_library(93'vulkan_virtio',94[libvn_files, vn_entrypoints, sha1_h],95include_directories : [96inc_include, inc_src, inc_vulkan_wsi, inc_virtio,97],98link_with : vn_libs,99dependencies : [vn_deps],100c_args : [vn_flags],101link_args : [ld_args_bsymbolic, ld_args_gc_sections],102gnu_symbol_visibility : 'hidden',103install : true,104)105106107