1# Copyright 2022 Android Open Source Project 2# SPDX-License-Identifier: MIT 3 4subdir('stubs') 5 6files_lib_vulkan_gfxstream = files( 7 'gfxstream_vk_device.cpp', 8 'gfxstream_vk_cmd.cpp', 9 'gfxstream_vk_wsi.cpp' 10) 11 12gfxstream_vk_wsi_args = [] 13if with_platform_x11 14 gfxstream_vk_wsi_args += '-DGFXSTREAM_VK_X11' 15endif 16 17if with_platform_wayland 18 gfxstream_vk_wsi_args += '-DGFXSTREAM_VK_WAYLAND' 19endif 20 21lib_vulkan_gfxstream = shared_library( 22 'vulkan_gfxstream', 23 files_lib_vulkan_gfxstream + files_lib_vulkan_enc + gfxstream_vk_entrypoints + 24 gfxstream_guest_vk_autogen + vulkan_gfxstream_h, 25 cpp_args: gfxstream_guest_args + gfxstream_vk_wsi_args, 26 include_directories: [inc_vulkan_headers, inc_guest_iostream, 27 inc_vulkan_enc, inc_platform_virtgpu, 28 inc_gfxstream_vk_stubs, inc_goldfish_address_space, 29 inc_include, inc_src, inc_aemu, 30 inc_platform_virtgpu, inc_connection_manager], 31 link_with: [libgfxstream_vk_stubs, libvulkan_wsi, libplatform_virtgpu, 32 libconnection_manager, libaemu], 33 link_args: [vulkan_icd_link_args, ld_args_bsymbolic, ld_args_gc_sections], 34 link_depends: vulkan_icd_link_depends, 35 dependencies: [dep_libdrm, idep_vulkan_wsi_headers, 36 idep_vulkan_lite_runtime, idep_vulkan_util_headers, 37 idep_vulkan_wsi, dep_valgrind], 38 install: true, 39) 40 41gfxstream_icd = custom_target( 42 'gfxstream_vk_icd', 43 input : [vk_icd_gen, vk_api_xml], 44 output : 'gfxstream_vk_icd.@[email protected]'.format(host_machine.cpu()), 45 command : [ 46 prog_python, '@INPUT0@', 47 '--api-version', '1.1', '--xml', '@INPUT1@', 48 '--lib-path', join_paths(get_option('prefix'), get_option('libdir'), 49 'libvulkan_gfxstream.so'), 50 '--out', '@OUTPUT@', 51 ], 52 build_by_default : true, 53 install_dir : with_vulkan_icd_dir, 54 install : true, 55) 56 57_dev_icdname = 'gfxstream_vk_devenv_icd.@[email protected]'.format(host_machine.cpu()) 58_dev_icd = custom_target( 59 'gfxstream_vk_devenv_icd', 60 input : [vk_icd_gen, vk_api_xml], 61 output : _dev_icdname, 62 command : [ 63 prog_python, '@INPUT0@', 64 '--api-version', '1.3', '--xml', '@INPUT1@', 65 '--lib-path', meson.current_build_dir() / 'libvulkan_gfxstream.so', 66 '--out', '@OUTPUT@', 67 ], 68 build_by_default : true, 69) 70 71devenv.append('VK_ICD_FILENAMES', _dev_icd.full_path()) 72