1 2 3libvulkan_lvp = shared_library( 4 'vulkan_lvp', 5 [ 'lavapipe_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 # On Apple systems, "weak" is actually "weak_import", which is slightly different. 13 # The linker still expects a definition for weak symbols at build time, just not at runtime. 14 # We have to forcibly ignore undefined symbols, which unfortunately applies to all symbols. 15 override_options : ['b_lundef=@0@'.format(host_machine.system() == 'darwin' ? 'false' : get_option('b_lundef').to_string())], 16 dependencies : [driver_llvmpipe, idep_mesautil], 17 name_prefix : host_machine.system() == 'windows' ? '' : [], 18 install : true, 19) 20 21if host_machine.system() == 'windows' 22 icd_lib_path = import('fs').relative_to(get_option('bindir'), with_vulkan_icd_dir) 23 icd_file_name = 'vulkan_lvp.dll' 24else 25 icd_lib_path = join_paths(get_option('prefix'), get_option('libdir')) 26 icd_file_name = 'libvulkan_lvp.@0@'.format(host_machine.system() == 'darwin' ? 'dylib' : 'so') 27endif 28 29icd_command = [ 30 prog_python, '@INPUT0@', 31 '--api-version', '1.3', '--xml', '@INPUT1@', 32 '--lib-path', join_paths(icd_lib_path, icd_file_name), 33 '--out', '@OUTPUT@', 34] 35if host_machine.system() == 'windows' 36 icd_command += '--use-backslash' 37endif 38 39lvp_icd = custom_target( 40 'lvp_icd', 41 input : [vk_icd_gen, vk_api_xml], 42 output : 'lvp_icd.@[email protected]'.format(host_machine.cpu()), 43 command : icd_command, 44 build_by_default : true, 45 install_dir : with_vulkan_icd_dir, 46 install_tag : 'runtime', 47 install : true, 48) 49 50_dev_icdname = 'lvp_devenv_icd.@[email protected]'.format(host_machine.cpu()) 51_dev_icd = custom_target( 52 'lvp_devenv_icd', 53 input : [vk_icd_gen, vk_api_xml], 54 output : _dev_icdname, 55 command : [ 56 prog_python, '@INPUT0@', 57 '--api-version', '1.1', '--xml', '@INPUT1@', 58 '--lib-path', meson.current_build_dir() / icd_file_name, 59 '--out', '@OUTPUT@', 60 ], 61 build_by_default : true, 62) 63 64devenv.append('VK_DRIVER_FILES', _dev_icd.full_path()) 65# Deprecated: replaced by VK_DRIVER_FILES above 66devenv.append('VK_ICD_FILENAMES', _dev_icd.full_path()) 67