meson: add override_dependency when possible
This allows consumers of libdrm as a subproject to use the simpler `dependency('libdrm', fallback : 'libdrm')` syntax, as the libdrm build files already tell meson that they override a dependency called "libdrm". Signed-off-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Simon Ser <contact@emersion.fr>main
parent
9324e4f054
commit
d9188a7750
|
@ -57,6 +57,10 @@ ext_libdrm_amdgpu = declare_dependency(
|
||||||
include_directories : [inc_drm, include_directories('.')],
|
include_directories : [inc_drm, include_directories('.')],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('libdrm_amdgpu', ext_libdrm_amdgpu)
|
||||||
|
endif
|
||||||
|
|
||||||
test(
|
test(
|
||||||
'amdgpu-symbols-check',
|
'amdgpu-symbols-check',
|
||||||
symbols_check,
|
symbols_check,
|
||||||
|
|
|
@ -52,6 +52,10 @@ ext_libdrm_etnaviv = declare_dependency(
|
||||||
include_directories : [inc_drm, include_directories('.')],
|
include_directories : [inc_drm, include_directories('.')],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('libdrm_etnaviv', ext_libdrm_etnaviv)
|
||||||
|
endif
|
||||||
|
|
||||||
test(
|
test(
|
||||||
'etnaviv-symbols-check',
|
'etnaviv-symbols-check',
|
||||||
symbols_check,
|
symbols_check,
|
||||||
|
|
|
@ -37,6 +37,10 @@ ext_libdrm_exynos = declare_dependency(
|
||||||
include_directories : [inc_drm, include_directories('.')],
|
include_directories : [inc_drm, include_directories('.')],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('libdrm_exynos', ext_libdrm_exynos)
|
||||||
|
endif
|
||||||
|
|
||||||
pkg.generate(
|
pkg.generate(
|
||||||
name : 'libdrm_exynos',
|
name : 'libdrm_exynos',
|
||||||
libraries : libdrm_exynos,
|
libraries : libdrm_exynos,
|
||||||
|
|
|
@ -55,6 +55,10 @@ ext_libdrm_freedreno = declare_dependency(
|
||||||
include_directories : [inc_drm, include_directories('.')],
|
include_directories : [inc_drm, include_directories('.')],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('libdrm_freedreno', ext_libdrm_freedreno)
|
||||||
|
endif
|
||||||
|
|
||||||
install_headers(
|
install_headers(
|
||||||
'freedreno_drmif.h', 'freedreno_ringbuffer.h',
|
'freedreno_drmif.h', 'freedreno_ringbuffer.h',
|
||||||
subdir : 'freedreno'
|
subdir : 'freedreno'
|
||||||
|
|
|
@ -40,6 +40,10 @@ ext_libdrm_intel = declare_dependency(
|
||||||
include_directories : [inc_drm, include_directories('.')],
|
include_directories : [inc_drm, include_directories('.')],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('libdrm_intel', ext_libdrm_intel)
|
||||||
|
endif
|
||||||
|
|
||||||
install_headers(
|
install_headers(
|
||||||
'intel_bufmgr.h', 'intel_aub.h', 'intel_debug.h',
|
'intel_bufmgr.h', 'intel_aub.h', 'intel_debug.h',
|
||||||
subdir : 'libdrm',
|
subdir : 'libdrm',
|
||||||
|
|
|
@ -56,6 +56,10 @@ ext_libkms = declare_dependency(
|
||||||
include_directories : [libkms_include],
|
include_directories : [libkms_include],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('kms', ext_libkms)
|
||||||
|
endif
|
||||||
|
|
||||||
install_headers('libkms.h', subdir : 'libkms')
|
install_headers('libkms.h', subdir : 'libkms')
|
||||||
|
|
||||||
pkg.generate(
|
pkg.generate(
|
||||||
|
|
|
@ -340,6 +340,10 @@ ext_libdrm = declare_dependency(
|
||||||
include_directories : [inc_root, inc_drm],
|
include_directories : [inc_root, inc_drm],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('libdrm', ext_libdrm)
|
||||||
|
endif
|
||||||
|
|
||||||
install_headers('libsync.h', 'xf86drm.h', 'xf86drmMode.h')
|
install_headers('libsync.h', 'xf86drm.h', 'xf86drmMode.h')
|
||||||
install_headers(
|
install_headers(
|
||||||
'include/drm/drm.h', 'include/drm/drm_fourcc.h', 'include/drm/drm_mode.h',
|
'include/drm/drm.h', 'include/drm/drm_fourcc.h', 'include/drm/drm_mode.h',
|
||||||
|
|
|
@ -35,6 +35,10 @@ ext_libdrm_nouveau = declare_dependency(
|
||||||
include_directories : [inc_drm, include_directories('.')],
|
include_directories : [inc_drm, include_directories('.')],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('libdrm_nouveau', ext_libdrm_nouveau)
|
||||||
|
endif
|
||||||
|
|
||||||
install_headers('nouveau.h', subdir : 'libdrm/nouveau')
|
install_headers('nouveau.h', subdir : 'libdrm/nouveau')
|
||||||
install_headers(
|
install_headers(
|
||||||
'nvif/class.h', 'nvif/cl0080.h', 'nvif/cl9097.h', 'nvif/if0002.h',
|
'nvif/class.h', 'nvif/cl0080.h', 'nvif/cl9097.h', 'nvif/if0002.h',
|
||||||
|
|
|
@ -34,6 +34,10 @@ ext_libdrm_omap = declare_dependency(
|
||||||
include_directories : [inc_drm, include_directories('.')],
|
include_directories : [inc_drm, include_directories('.')],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('libdrm_omap', ext_libdrm_omap)
|
||||||
|
endif
|
||||||
|
|
||||||
install_headers('omap_drmif.h', subdir : 'libdrm')
|
install_headers('omap_drmif.h', subdir : 'libdrm')
|
||||||
install_headers('omap_drm.h', subdir : 'omap')
|
install_headers('omap_drm.h', subdir : 'omap')
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,10 @@ ext_libdrm_radeon = declare_dependency(
|
||||||
include_directories : [inc_drm, include_directories('.')],
|
include_directories : [inc_drm, include_directories('.')],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('libdrm_radeon', ext_libdrm_radeon)
|
||||||
|
endif
|
||||||
|
|
||||||
install_headers(
|
install_headers(
|
||||||
'radeon_bo.h', 'radeon_cs.h', 'radeon_surface.h', 'radeon_bo_gem.h',
|
'radeon_bo.h', 'radeon_cs.h', 'radeon_surface.h', 'radeon_bo_gem.h',
|
||||||
'radeon_cs_gem.h', 'radeon_bo_int.h', 'radeon_cs_int.h', 'r600_pci_ids.h',
|
'radeon_cs_gem.h', 'radeon_bo_int.h', 'radeon_cs_int.h', 'r600_pci_ids.h',
|
||||||
|
|
|
@ -34,6 +34,10 @@ ext_libdrm_tegra = declare_dependency(
|
||||||
include_directories : [inc_drm, include_directories('.')],
|
include_directories : [inc_drm, include_directories('.')],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('libdrm_tegra', ext_libdrm_tegra)
|
||||||
|
endif
|
||||||
|
|
||||||
install_headers('tegra.h', subdir : 'libdrm')
|
install_headers('tegra.h', subdir : 'libdrm')
|
||||||
|
|
||||||
pkg.generate(
|
pkg.generate(
|
||||||
|
|
Loading…
Reference in New Issue