diff --git a/meson.build b/meson.build index 0b04f2ffaaa..30ba422e36c 100644 --- a/meson.build +++ b/meson.build @@ -22,8 +22,7 @@ project( 'mesa', ['c', 'cpp'], version : run_command( - [find_program('python3', 'python'), 'bin/meson_get_version.py', - meson.version().version_compare('>= 0.56') ? meson.project_source_root() : meson.source_root()], + [find_program('python3', 'python'), 'bin/meson_get_version.py', meson.project_source_root()], check : true ).stdout(), license : 'MIT', @@ -2082,22 +2081,14 @@ gcc_lto_quirk = (cc.get_id() == 'gcc') ? ['-fno-lto'] : [] devenv = environment() dir_compiler_nir = join_paths(meson.current_source_dir(), 'src/compiler/nir/') -if meson.version().version_compare('>= 0.56') - dir_source_root = meson.project_source_root() -else - # source_root() returns a source root of the parent project if called from - # a subproject, which makes impossible to use Mesa as a meson subproject. - dir_source_root = meson.source_root() -endif +dir_source_root = meson.project_source_root() subdir('include') subdir('bin') subdir('src') -if meson.version().version_compare('>= 0.58') - meson.add_devenv(devenv) -endif +meson.add_devenv(devenv) lines = ['', 'prefix: ' + get_option('prefix'), diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build index 7f0bcfa102a..fa22034053f 100644 --- a/src/amd/vulkan/meson.build +++ b/src/amd/vulkan/meson.build @@ -245,20 +245,18 @@ radeon_icd = custom_target( install : true, ) -if meson.version().version_compare('>= 0.58') - _dev_icdname = 'radeon_devenv_icd.@0@.json'.format(host_machine.cpu()) - custom_target( - 'radeon_devenv_icd', - input : [vk_icd_gen, vk_api_xml], - output : _dev_icdname, - command : [ - prog_python, '@INPUT0@', - '--api-version', '1.3', '--xml', '@INPUT1@', - '--lib-path', meson.current_build_dir() / icd_file_name, - '--out', '@OUTPUT@', - ], - build_by_default : true, - ) +_dev_icdname = 'radeon_devenv_icd.@0@.json'.format(host_machine.cpu()) +custom_target( + 'radeon_devenv_icd', + input : [vk_icd_gen, vk_api_xml], + output : _dev_icdname, + command : [ + prog_python, '@INPUT0@', + '--api-version', '1.3', '--xml', '@INPUT1@', + '--lib-path', meson.current_build_dir() / icd_file_name, + '--out', '@OUTPUT@', + ], + build_by_default : true, +) - devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) -endif +devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) diff --git a/src/broadcom/vulkan/meson.build b/src/broadcom/vulkan/meson.build index 80c37a974a0..e2c19816a17 100644 --- a/src/broadcom/vulkan/meson.build +++ b/src/broadcom/vulkan/meson.build @@ -167,20 +167,18 @@ broadcom_icd = custom_target( install : true, ) -if meson.version().version_compare('>= 0.58') - _dev_icdname = 'broadcom_devenv_icd.@0@.json'.format(host_machine.cpu()) - custom_target( - 'broadcom_devenv_icd', - input : [vk_icd_gen, vk_api_xml], - output : _dev_icdname, - command : [ - prog_python, '@INPUT0@', - '--api-version', '1.3', '--xml', '@INPUT1@', - '--lib-path', meson.current_build_dir() / 'libvulkan_broadcom.so', - '--out', '@OUTPUT@', - ], - build_by_default : true, - ) +_dev_icdname = 'broadcom_devenv_icd.@0@.json'.format(host_machine.cpu()) +custom_target( + 'broadcom_devenv_icd', + input : [vk_icd_gen, vk_api_xml], + output : _dev_icdname, + command : [ + prog_python, '@INPUT0@', + '--api-version', '1.3', '--xml', '@INPUT1@', + '--lib-path', meson.current_build_dir() / 'libvulkan_broadcom.so', + '--out', '@OUTPUT@', + ], + build_by_default : true, +) - devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) -endif +devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) diff --git a/src/freedreno/vulkan/meson.build b/src/freedreno/vulkan/meson.build index 2f2a176b04f..ee265aa9860 100644 --- a/src/freedreno/vulkan/meson.build +++ b/src/freedreno/vulkan/meson.build @@ -162,20 +162,18 @@ freedreno_icd = custom_target( install : true, ) -if meson.version().version_compare('>= 0.58') - _dev_icdname = 'freedreno_devenv_icd.@0@.json'.format(host_machine.cpu()) - custom_target( - 'freedreno_devenv_icd', - input : [vk_icd_gen, vk_api_xml], - output : _dev_icdname, - command : [ - prog_python, '@INPUT0@', - '--api-version', '1.1', '--xml', '@INPUT1@', - '--lib-path', meson.current_build_dir() / 'libvulkan_freedreno.so', - '--out', '@OUTPUT@', - ], - build_by_default : true, - ) +_dev_icdname = 'freedreno_devenv_icd.@0@.json'.format(host_machine.cpu()) +custom_target( + 'freedreno_devenv_icd', + input : [vk_icd_gen, vk_api_xml], + output : _dev_icdname, + command : [ + prog_python, '@INPUT0@', + '--api-version', '1.1', '--xml', '@INPUT1@', + '--lib-path', meson.current_build_dir() / 'libvulkan_freedreno.so', + '--out', '@OUTPUT@', + ], + build_by_default : true, +) - devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) -endif +devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build index b1c57d3cf04..ddf67e99b6c 100644 --- a/src/gallium/targets/dri/meson.build +++ b/src/gallium/targets/dri/meson.build @@ -121,22 +121,20 @@ foreach d : [[with_gallium_kmsro, [ endif endforeach -if meson.version().version_compare('>= 0.58') - # This only works on Unix-like oses, which is probably fine for dri - prog_ln = find_program('ln', required : false) - if prog_ln.found() - devenv.set('LIBGL_DRIVERS_PATH', meson.current_build_dir()) +# This only works on Unix-like oses, which is probably fine for dri +prog_ln = find_program('ln', required : false) +if prog_ln.found() + devenv.set('LIBGL_DRIVERS_PATH', meson.current_build_dir()) - foreach d : gallium_dri_drivers - custom_target( - 'devenv_@0@'.format(d), - input : libgallium_dri, - output : d, - command : [prog_ln, '-f', '@INPUT@', '@OUTPUT@'], - build_by_default : true, - ) - endforeach - endif + foreach d : gallium_dri_drivers + custom_target( + 'devenv_@0@'.format(d), + input : libgallium_dri, + output : d, + command : [prog_ln, '-f', '@INPUT@', '@OUTPUT@'], + build_by_default : true, + ) + endforeach endif meson.add_install_script( diff --git a/src/gallium/targets/lavapipe/meson.build b/src/gallium/targets/lavapipe/meson.build index 46e9d9a93e4..d221cbb2a38 100644 --- a/src/gallium/targets/lavapipe/meson.build +++ b/src/gallium/targets/lavapipe/meson.build @@ -41,20 +41,18 @@ lvp_icd = custom_target( install : true, ) -if meson.version().version_compare('>= 0.58') - _dev_icdname = 'lvp_devenv_icd.@0@.json'.format(host_machine.cpu()) - custom_target( - 'lvp_devenv_icd', - input : [vk_icd_gen, vk_api_xml], - output : _dev_icdname, - command : [ - prog_python, '@INPUT0@', - '--api-version', '1.1', '--xml', '@INPUT1@', - '--lib-path', meson.current_build_dir() / 'libvulkan_lvp.so', - '--out', '@OUTPUT@', - ], - build_by_default : true, - ) +_dev_icdname = 'lvp_devenv_icd.@0@.json'.format(host_machine.cpu()) +custom_target( + 'lvp_devenv_icd', + input : [vk_icd_gen, vk_api_xml], + output : _dev_icdname, + command : [ + prog_python, '@INPUT0@', + '--api-version', '1.1', '--xml', '@INPUT1@', + '--lib-path', meson.current_build_dir() / 'libvulkan_lvp.so', + '--out', '@OUTPUT@', + ], + build_by_default : true, +) - devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) -endif +devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build index 96e83f23c77..962fb2559bf 100644 --- a/src/gallium/targets/opencl/meson.build +++ b/src/gallium/targets/opencl/meson.build @@ -127,11 +127,9 @@ if with_opencl_icd install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'), ) - if meson.version().version_compare('>= 0.58') - # .so is hardcoded in the icd as well - devenv.prepend( - 'OCL_ICD_FILENAMES', - meson.current_build_dir() / 'libMesaOpenCL.so.@0@'.format(opencl_version) - ) - endif + # .so is hardcoded in the icd as well + devenv.prepend( + 'OCL_ICD_FILENAMES', + meson.current_build_dir() / 'libMesaOpenCL.so.@0@'.format(opencl_version) + ) endif diff --git a/src/gallium/targets/rusticl/meson.build b/src/gallium/targets/rusticl/meson.build index 71c5da2129e..279951a782c 100644 --- a/src/gallium/targets/rusticl/meson.build +++ b/src/gallium/targets/rusticl/meson.build @@ -63,10 +63,8 @@ configure_file( install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'), ) -if meson.version().version_compare('>= 0.58') - # .so is hardcoded in the icd as well - devenv.prepend( - 'OCL_ICD_VENDORS', - meson.current_build_dir() / 'libRusticlOpenCL.so.@0@'.format(opencl_version) - ) -endif +# .so is hardcoded in the icd as well +devenv.prepend( + 'OCL_ICD_VENDORS', + meson.current_build_dir() / 'libRusticlOpenCL.so.@0@'.format(opencl_version) +) diff --git a/src/imagination/vulkan/meson.build b/src/imagination/vulkan/meson.build index ae15fff4649..6c05eddb454 100644 --- a/src/imagination/vulkan/meson.build +++ b/src/imagination/vulkan/meson.build @@ -161,20 +161,18 @@ powervr_mesa_icd = custom_target( install : true, ) -if meson.version().version_compare('>= 0.58') - _dev_icdname = 'powervr_mesa_devenv_icd.@0@.json'.format(host_machine.cpu()) - custom_target( - 'powervr_mesa_devenv_icd', - input : [vk_icd_gen, vk_api_xml], - output : _dev_icdname, - command : [ - prog_python, '@INPUT0@', - '--api-version', '1.0', '--xml', '@INPUT1@', - '--lib-path', meson.current_build_dir() / 'libvulkan_powervr_mesa.so', - '--out', '@OUTPUT@', - ], - build_by_default : true, - ) +_dev_icdname = 'powervr_mesa_devenv_icd.@0@.json'.format(host_machine.cpu()) +custom_target( + 'powervr_mesa_devenv_icd', + input : [vk_icd_gen, vk_api_xml], + output : _dev_icdname, + command : [ + prog_python, '@INPUT0@', + '--api-version', '1.0', '--xml', '@INPUT1@', + '--lib-path', meson.current_build_dir() / 'libvulkan_powervr_mesa.so', + '--out', '@OUTPUT@', + ], + build_by_default : true, +) - devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) -endif +devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build index f9e0e90031b..380552791b2 100644 --- a/src/intel/vulkan/meson.build +++ b/src/intel/vulkan/meson.build @@ -77,23 +77,21 @@ intel_icd = custom_target( install : true, ) -if meson.version().version_compare('>= 0.58') - _dev_icdname = 'intel_devenv_icd.@0@.json'.format(host_machine.cpu()) - custom_target( - 'intel_devenv_icd', - input : [vk_icd_gen, vk_api_xml], - output : _dev_icdname, - command : [ - prog_python, '@INPUT0@', - '--api-version', '1.3', '--xml', '@INPUT1@', - '--lib-path', meson.current_build_dir() / 'libvulkan_intel.so', - '--out', '@OUTPUT@', - ], - build_by_default : true, - ) +_dev_icdname = 'intel_devenv_icd.@0@.json'.format(host_machine.cpu()) +custom_target( + 'intel_devenv_icd', + input : [vk_icd_gen, vk_api_xml], + output : _dev_icdname, + command : [ + prog_python, '@INPUT0@', + '--api-version', '1.3', '--xml', '@INPUT1@', + '--lib-path', meson.current_build_dir() / 'libvulkan_intel.so', + '--out', '@OUTPUT@', + ], + build_by_default : true, +) - devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) -endif +devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) libanv_per_hw_ver_libs = [] anv_per_hw_ver_files = files( diff --git a/src/intel/vulkan_hasvk/meson.build b/src/intel/vulkan_hasvk/meson.build index 7fcbc3b42cf..10197493469 100644 --- a/src/intel/vulkan_hasvk/meson.build +++ b/src/intel/vulkan_hasvk/meson.build @@ -48,23 +48,21 @@ intel_hasvk_icd = custom_target( install : true, ) -if meson.version().version_compare('>= 0.58') - _dev_icdname = 'intel_hasvk_devenv_icd.@0@.json'.format(host_machine.cpu()) - custom_target( - 'intel_hasvk_devenv_icd', - input : [vk_icd_gen, vk_api_xml], - output : _dev_icdname, - command : [ - prog_python, '@INPUT0@', - '--api-version', '1.3', '--xml', '@INPUT1@', - '--lib-path', meson.current_build_dir() / 'libvulkan_intel_hasvk.so', - '--out', '@OUTPUT@', - ], - build_by_default : true, - ) +_dev_icdname = 'intel_hasvk_devenv_icd.@0@.json'.format(host_machine.cpu()) +custom_target( + 'intel_hasvk_devenv_icd', + input : [vk_icd_gen, vk_api_xml], + output : _dev_icdname, + command : [ + prog_python, '@INPUT0@', + '--api-version', '1.3', '--xml', '@INPUT1@', + '--lib-path', meson.current_build_dir() / 'libvulkan_intel_hasvk.so', + '--out', '@OUTPUT@', + ], + build_by_default : true, +) - devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) -endif +devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) libanv_per_hw_ver_libs = [] anv_per_hw_ver_files = files( diff --git a/src/microsoft/vulkan/meson.build b/src/microsoft/vulkan/meson.build index d1885442b49..47882d27577 100644 --- a/src/microsoft/vulkan/meson.build +++ b/src/microsoft/vulkan/meson.build @@ -130,15 +130,13 @@ dzn_icd = custom_target( install : true, ) -if meson.version().version_compare('>= 0.58') - _dev_icdname = 'dzn_devenv_icd.@0@.json'.format(host_machine.cpu()) - custom_target( - 'dzn_devenv_icd', - input : [vk_icd_gen, vk_api_xml], - output : _dev_icdname, - command : icd_dev_command, - build_by_default : true, - ) +_dev_icdname = 'dzn_devenv_icd.@0@.json'.format(host_machine.cpu()) +custom_target( + 'dzn_devenv_icd', + input : [vk_icd_gen, vk_api_xml], + output : _dev_icdname, + command : icd_dev_command, + build_by_default : true, +) - devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) -endif +devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) diff --git a/src/panfrost/vulkan/meson.build b/src/panfrost/vulkan/meson.build index 55d91c20f8b..c09560be5d5 100644 --- a/src/panfrost/vulkan/meson.build +++ b/src/panfrost/vulkan/meson.build @@ -155,20 +155,18 @@ panfrost_icd = custom_target( install : true, ) -if meson.version().version_compare('>= 0.58') - _dev_icdname = 'panfrost_devenv_icd.@0@.json'.format(host_machine.cpu()) - custom_target( - 'panfrost_devenv_icd', - input : [vk_icd_gen, vk_api_xml], - output : _dev_icdname, - command : [ - prog_python, '@INPUT0@', - '--api-version', '1.1', '--xml', '@INPUT1@', - '--lib-path', meson.current_build_dir() / 'libvulkan_panfrost.so', - '--out', '@OUTPUT@', - ], - build_by_default : true, - ) +_dev_icdname = 'panfrost_devenv_icd.@0@.json'.format(host_machine.cpu()) +custom_target( + 'panfrost_devenv_icd', + input : [vk_icd_gen, vk_api_xml], + output : _dev_icdname, + command : [ + prog_python, '@INPUT0@', + '--api-version', '1.1', '--xml', '@INPUT1@', + '--lib-path', meson.current_build_dir() / 'libvulkan_panfrost.so', + '--out', '@OUTPUT@', + ], + build_by_default : true, +) - devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) -endif +devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) diff --git a/src/virtio/vulkan/meson.build b/src/virtio/vulkan/meson.build index 73461ccc929..a4c59ae8df5 100644 --- a/src/virtio/vulkan/meson.build +++ b/src/virtio/vulkan/meson.build @@ -30,23 +30,21 @@ virtio_icd = custom_target( install : true, ) -if meson.version().version_compare('>= 0.58') - _dev_icdname = 'virtio_devenv_icd.@0@.json'.format(host_machine.cpu()) - custom_target( - 'virtio_devenv_icd', - input : [vk_icd_gen, vk_api_xml], - output : _dev_icdname, - command : [ - prog_python, '@INPUT0@', - '--api-version', '1.2', '--xml', '@INPUT1@', - '--lib-path', meson.current_build_dir() / 'libvulkan_virtio.so', - '--out', '@OUTPUT@', - ], - build_by_default : true, - ) +_dev_icdname = 'virtio_devenv_icd.@0@.json'.format(host_machine.cpu()) +custom_target( + 'virtio_devenv_icd', + input : [vk_icd_gen, vk_api_xml], + output : _dev_icdname, + command : [ + prog_python, '@INPUT0@', + '--api-version', '1.2', '--xml', '@INPUT1@', + '--lib-path', meson.current_build_dir() / 'libvulkan_virtio.so', + '--out', '@OUTPUT@', + ], + build_by_default : true, +) - devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) -endif +devenv.append('VK_ICD_FILENAMES', meson.current_build_dir() / _dev_icdname) libvn_files = files( 'vn_buffer.c',