1 2 3libvulkan_lvp = shared_library( 4 'vulkan_lvp', 5 [ 'target.c' ], 6 vs_module_defs : vulkan_api_def, 7 include_directories : [ inc_src, inc_util, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_winsys, inc_gallium_drivers ], 8 link_whole : [ liblavapipe_st ], 9 link_with : [libpipe_loader_static, libgallium, libwsw, libswdri, libws_null, libswkmsdri ], 10 gnu_symbol_visibility : 'hidden', 11 link_args : [ld_args_bsymbolic, ld_args_gc_sections], 12 dependencies : driver_swrast, 13 name_prefix : host_machine.system() == 'windows' ? '' : 'lib', 14 install : true, 15) 16 17icd_file_name = 'libvulkan_lvp.so' 18module_dir = join_paths(get_option('prefix'), get_option('libdir')) 19if with_platform_windows 20 module_dir = join_paths(get_option('prefix'), get_option('bindir')) 21 icd_file_name = 'vulkan_lvp.dll' 22endif 23 24icd_command = [ 25 prog_python, '@INPUT0@', 26 '--api-version', '1.1', '--xml', '@INPUT1@', 27 '--lib-path', join_paths(module_dir, icd_file_name), 28 '--out', '@OUTPUT@', 29] 30if with_platform_windows 31 icd_command += '--use-backslash' 32endif 33 34lvp_icd = custom_target( 35 'lvp_icd', 36 input : [vk_icd_gen, vk_api_xml], 37 output : 'lvp_icd.@0@.json'.format(host_machine.cpu()), 38 command : icd_command, 39 build_by_default : true, 40 install_dir : with_vulkan_icd_dir, 41 install : true, 42) 43 44if meson.version().version_compare('>= 0.58') 45 _dev_icdname = 'lvp_devenv_icd.@0@.json'.format(host_machine.cpu()) 46 custom_target( 47 'lvp_devenv_icd', 48 input : [vk_icd_gen, vk_api_xml], 49 output : _dev_icdname, 50 command : [ 51 prog_python, '@INPUT0@', 52 '--api-version', '1.1', '--xml', '@INPUT1@', 53 '--lib-path', meson.current_build_dir() / 'libvulkan_lvp.so', 54 '--out', '@OUTPUT@', 55 ], 56 build_by_default : true, 57 ) 58 59 devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) 60endif 61