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/cam/meson.build | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/apps/cam/meson.build') diff --git a/src/apps/cam/meson.build b/src/apps/cam/meson.build index 297de64f..48c834ac 100644 --- a/src/apps/cam/meson.build +++ b/src/apps/cam/meson.build @@ -10,16 +10,12 @@ cam_enabled = true cam_sources = files([ 'camera_session.cpp', 'capture_script.cpp', - 'event_loop.cpp', 'file_sink.cpp', 'frame_sink.cpp', - 'image.cpp', 'main.cpp', - 'options.cpp', - 'stream_options.cpp', ]) -cam_cpp_args = [] +cam_cpp_args = [apps_cpp_args] libdrm = dependency('libdrm', required : false) libjpeg = dependency('libjpeg', required : false) @@ -49,14 +45,8 @@ if libsdl2.found() endif endif -if libtiff.found() - cam_cpp_args += ['-DHAVE_TIFF'] - cam_sources += files([ - 'dng_writer.cpp', - ]) -endif - cam = executable('cam', cam_sources, + link_with : apps_lib, dependencies : [ libatomic, libcamera_public, -- cgit v1.2.1