Message ID | 20221017171741.3803909-2-paul.elder@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Hi Paul, Thank you for the patch. On Tue, Oct 18, 2022 at 02:17:39AM +0900, Paul Elder via libcamera-devel wrote: > To prepare for adding DNG support to cam, move DNGWriter from qcam to > cam so that we only have inclusions from qcam to cam and not the other > way around. > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> > --- > src/{qcam => cam}/dng_writer.cpp | 0 > src/{qcam => cam}/dng_writer.h | 0 > src/cam/meson.build | 9 +++++++++ > src/qcam/main_window.cpp | 2 +- > src/qcam/meson.build | 2 +- > 5 files changed, 11 insertions(+), 2 deletions(-) > rename src/{qcam => cam}/dng_writer.cpp (100%) > rename src/{qcam => cam}/dng_writer.h (100%) > > diff --git a/src/qcam/dng_writer.cpp b/src/cam/dng_writer.cpp > similarity index 100% > rename from src/qcam/dng_writer.cpp > rename to src/cam/dng_writer.cpp > diff --git a/src/qcam/dng_writer.h b/src/cam/dng_writer.h > similarity index 100% > rename from src/qcam/dng_writer.h > rename to src/cam/dng_writer.h > diff --git a/src/cam/meson.build b/src/cam/meson.build > index 8259239f..06dbea06 100644 > --- a/src/cam/meson.build > +++ b/src/cam/meson.build > @@ -26,6 +26,7 @@ cam_cpp_args = [] > libdrm = dependency('libdrm', required : false) > libjpeg = dependency('libjpeg', required : false) > libsdl2 = dependency('SDL2', required : false) > +libtiff = dependency('libtiff-4', required : false) You could drop the libtiff dependency from src/qcam/meson.build to avoid searching for it twice, and just reuse the libtiff variable. It may be better placed in src/meson.build in that case though. Maybe that's something we can look at later, there's at least the libevent dependency that could be shared similarly. > > if libdrm.found() > cam_cpp_args += [ '-DHAVE_KMS' ] > @@ -51,6 +52,13 @@ if libsdl2.found() > endif > endif > > +if libtiff.found() > + cam_cpp_args += ['-DHAVE_TIFF'] > + cam_sources += files([ > + 'dng_writer.cpp', > + ]) > +endif This belongs to 2/3. > + > cam = executable('cam', cam_sources, > dependencies : [ > libatomic, > @@ -59,6 +67,7 @@ cam = executable('cam', cam_sources, > libevent, > libjpeg, > libsdl2, > + libtiff, This too. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > libyaml, > ], > cpp_args : cam_cpp_args, > diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp > index e0e5092e..f553ccb0 100644 > --- a/src/qcam/main_window.cpp > +++ b/src/qcam/main_window.cpp > @@ -26,10 +26,10 @@ > #include <QToolButton> > #include <QtDebug> > > +#include "../cam/dng_writer.h" > #include "../cam/image.h" > > #include "cam_select_dialog.h" > -#include "dng_writer.h" > #ifndef QT_NO_OPENGL > #include "viewfinder_gl.h" > #endif > diff --git a/src/qcam/meson.build b/src/qcam/meson.build > index 61861ea6..9f5759ff 100644 > --- a/src/qcam/meson.build > +++ b/src/qcam/meson.build > @@ -49,7 +49,7 @@ if tiff_dep.found() > qt5_cpp_args += ['-DHAVE_TIFF'] > qcam_deps += [tiff_dep] > qcam_sources += files([ > - 'dng_writer.cpp', > + '../cam/dng_writer.cpp', > ]) > endif >
diff --git a/src/qcam/dng_writer.cpp b/src/cam/dng_writer.cpp similarity index 100% rename from src/qcam/dng_writer.cpp rename to src/cam/dng_writer.cpp diff --git a/src/qcam/dng_writer.h b/src/cam/dng_writer.h similarity index 100% rename from src/qcam/dng_writer.h rename to src/cam/dng_writer.h diff --git a/src/cam/meson.build b/src/cam/meson.build index 8259239f..06dbea06 100644 --- a/src/cam/meson.build +++ b/src/cam/meson.build @@ -26,6 +26,7 @@ cam_cpp_args = [] libdrm = dependency('libdrm', required : false) libjpeg = dependency('libjpeg', required : false) libsdl2 = dependency('SDL2', required : false) +libtiff = dependency('libtiff-4', required : false) if libdrm.found() cam_cpp_args += [ '-DHAVE_KMS' ] @@ -51,6 +52,13 @@ 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, dependencies : [ libatomic, @@ -59,6 +67,7 @@ cam = executable('cam', cam_sources, libevent, libjpeg, libsdl2, + libtiff, libyaml, ], cpp_args : cam_cpp_args, diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index e0e5092e..f553ccb0 100644 --- a/src/qcam/main_window.cpp +++ b/src/qcam/main_window.cpp @@ -26,10 +26,10 @@ #include <QToolButton> #include <QtDebug> +#include "../cam/dng_writer.h" #include "../cam/image.h" #include "cam_select_dialog.h" -#include "dng_writer.h" #ifndef QT_NO_OPENGL #include "viewfinder_gl.h" #endif diff --git a/src/qcam/meson.build b/src/qcam/meson.build index 61861ea6..9f5759ff 100644 --- a/src/qcam/meson.build +++ b/src/qcam/meson.build @@ -49,7 +49,7 @@ if tiff_dep.found() qt5_cpp_args += ['-DHAVE_TIFF'] qcam_deps += [tiff_dep] qcam_sources += files([ - 'dng_writer.cpp', + '../cam/dng_writer.cpp', ]) endif
To prepare for adding DNG support to cam, move DNGWriter from qcam to cam so that we only have inclusions from qcam to cam and not the other way around. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> --- src/{qcam => cam}/dng_writer.cpp | 0 src/{qcam => cam}/dng_writer.h | 0 src/cam/meson.build | 9 +++++++++ src/qcam/main_window.cpp | 2 +- src/qcam/meson.build | 2 +- 5 files changed, 11 insertions(+), 2 deletions(-) rename src/{qcam => cam}/dng_writer.cpp (100%) rename src/{qcam => cam}/dng_writer.h (100%)