From a8113fb3a89984cc65d51436480cee45b60543e8 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 20 Oct 2022 01:25:45 +0300 Subject: apps: Share common source between applications Multiple source files in the src/apps/cam/ directory are used by cam, qcam and lc-compliance. They are compiled separately for each application. Move them to a new src/apps/common/ directory and compile them in a static library to decrease the number of compilation operations. Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain Reviewed-by: Kieran Bingham --- src/apps/common/meson.build | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/apps/common/meson.build (limited to 'src/apps/common/meson.build') diff --git a/src/apps/common/meson.build b/src/apps/common/meson.build new file mode 100644 index 00000000..479326cd --- /dev/null +++ b/src/apps/common/meson.build @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: CC0-1.0 + +apps_sources = files([ + 'image.cpp', + 'options.cpp', + 'stream_options.cpp', +]) + +apps_cpp_args = [] + +if libevent.found() + apps_sources += files([ + 'event_loop.cpp', + ]) +endif + +if libtiff.found() + apps_cpp_args += ['-DHAVE_TIFF'] + apps_sources += files([ + 'dng_writer.cpp', + ]) +endif + +apps_lib = static_library('apps', apps_sources, + cpp_args : apps_cpp_args, + dependencies : [libcamera_public]) -- cgit v1.2.1