From 491f1027c92f38b50221672768fb8234a82aa041 Mon Sep 17 00:00:00 2001 From: Piotr Rak Date: Wed, 23 Sep 2020 19:23:00 +0200 Subject: [PATCH] Workaround for headers in source directory. --- src/avcpp/filters/meson.build | 7 +++++++ src/avcpp/meson.build | 9 +++++++++ src/meson.build | 14 +++++++++----- 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 src/avcpp/filters/meson.build create mode 100644 src/avcpp/meson.build diff --git a/src/avcpp/filters/meson.build b/src/avcpp/filters/meson.build new file mode 100644 index 00000000..76c689a9 --- /dev/null +++ b/src/avcpp/filters/meson.build @@ -0,0 +1,7 @@ +foreach hdr : avcpp_filter_header + configure_file( + copy: true, + input: hdr, + output: '@PLAINNAME@' + ) +endforeach diff --git a/src/avcpp/meson.build b/src/avcpp/meson.build new file mode 100644 index 00000000..66501589 --- /dev/null +++ b/src/avcpp/meson.build @@ -0,0 +1,9 @@ +foreach hdr : avcpp_header + configure_file( + copy: true, + input: hdr, + output: '@PLAINNAME@' + ) +endforeach + +subdir('filters') diff --git a/src/meson.build b/src/meson.build index 0d7ccd45..2f0109b8 100644 --- a/src/meson.build +++ b/src/meson.build @@ -75,7 +75,7 @@ avcpp_sources = [ ] -avcpp_header = [ +avcpp_header = files( 'audioresampler.h', 'averror.h', 'av.h', @@ -98,16 +98,17 @@ avcpp_header = [ 'stream.h', 'timestamp.h', 'videorescaler.h', -] +) -avcpp_filter_header = [ +avcpp_filter_header = files( 'filters/buffersink.h', 'filters/buffersrc.h', 'filters/filtercontext.h', 'filters/filtergraph.h', 'filters/filter.h', 'filters/filterpad.h', -] +) + #defining how to build the library avcpp = library( @@ -120,10 +121,13 @@ avcpp = library( install : true ) +# make library usable as meson subproject +# workarounds https://github.com/mesonbuild/meson/issues/2546 +subdir('avcpp') + install_headers(avcpp_header, subdir : 'avcpp') install_headers(avcpp_filter_header, subdir : 'avcpp/filters') - #export the dependency information avcpp_dep = declare_dependency( include_directories : avcpp_incdir,