[libcamera-devel,v1,5/6] apps: Move libtiff dependency to src/apps/meson.build
diff mbox series

Message ID 20221019231537.26880-6-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • apps: Avoid duplicate compilation of common code
Related show

Commit Message

Laurent Pinchart Oct. 19, 2022, 11:15 p.m. UTC
libtiff is a shared dependency between cam and qcam, move it to
src/apps/. The shared dependency will be used to condition compilation
of source files in an upcoming application static library.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/apps/cam/meson.build  | 1 -
 src/apps/meson.build      | 2 ++
 src/apps/qcam/meson.build | 5 ++---
 3 files changed, 4 insertions(+), 4 deletions(-)

Comments

Nicolas Dufresne via libcamera-devel Oct. 20, 2022, 6:55 a.m. UTC | #1
On Thu, Oct 20, 2022 at 02:15:36AM +0300, Laurent Pinchart via libcamera-devel wrote:
> libtiff is a shared dependency between cam and qcam, move it to
> src/apps/. The shared dependency will be used to condition compilation
> of source files in an upcoming application static library.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

> ---
>  src/apps/cam/meson.build  | 1 -
>  src/apps/meson.build      | 2 ++
>  src/apps/qcam/meson.build | 5 ++---
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/apps/cam/meson.build b/src/apps/cam/meson.build
> index 4b6099ddab63..297de64fbdd9 100644
> --- a/src/apps/cam/meson.build
> +++ b/src/apps/cam/meson.build
> @@ -24,7 +24,6 @@ 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' ]
> diff --git a/src/apps/meson.build b/src/apps/meson.build
> index 159deb0b7fc2..95f1f5190c7a 100644
> --- a/src/apps/meson.build
> +++ b/src/apps/meson.build
> @@ -8,6 +8,8 @@ if not libevent.found()
>      libevent = dependency('libevent_pthreads', required : opt_lc_compliance)
>  endif
>  
> +libtiff = dependency('libtiff-4', required : false)
> +
>  subdir('lc-compliance')
>  
>  subdir('cam')
> diff --git a/src/apps/qcam/meson.build b/src/apps/qcam/meson.build
> index d5916d0df532..e298101e2c43 100644
> --- a/src/apps/qcam/meson.build
> +++ b/src/apps/qcam/meson.build
> @@ -38,8 +38,7 @@ qcam_resources = files([
>  
>  qt5_cpp_args = ['-DQT_NO_KEYWORDS']
>  
> -tiff_dep = dependency('libtiff-4', required : false)
> -if tiff_dep.found()
> +if libtiff.found()
>      qt5_cpp_args += ['-DHAVE_TIFF']
>      qcam_sources += files([
>          '../cam/dng_writer.cpp',
> @@ -77,7 +76,7 @@ qcam  = executable('qcam', qcam_sources, resources,
>                     dependencies : [
>                         libatomic,
>                         libcamera_public,
> +                       libtiff,
>                         qt5_dep,
> -                       tiff_dep,
>                     ],
>                     cpp_args : qt5_cpp_args)
Kieran Bingham Oct. 20, 2022, 9:49 a.m. UTC | #2
Quoting Paul Elder via libcamera-devel (2022-10-20 07:55:50)
> On Thu, Oct 20, 2022 at 02:15:36AM +0300, Laurent Pinchart via libcamera-devel wrote:
> > libtiff is a shared dependency between cam and qcam, move it to
> > src/apps/. The shared dependency will be used to condition compilation
> > of source files in an upcoming application static library.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> 
> > ---
> >  src/apps/cam/meson.build  | 1 -
> >  src/apps/meson.build      | 2 ++
> >  src/apps/qcam/meson.build | 5 ++---
> >  3 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/src/apps/cam/meson.build b/src/apps/cam/meson.build
> > index 4b6099ddab63..297de64fbdd9 100644
> > --- a/src/apps/cam/meson.build
> > +++ b/src/apps/cam/meson.build
> > @@ -24,7 +24,6 @@ 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' ]
> > diff --git a/src/apps/meson.build b/src/apps/meson.build
> > index 159deb0b7fc2..95f1f5190c7a 100644
> > --- a/src/apps/meson.build
> > +++ b/src/apps/meson.build
> > @@ -8,6 +8,8 @@ if not libevent.found()
> >      libevent = dependency('libevent_pthreads', required : opt_lc_compliance)
> >  endif
> >  
> > +libtiff = dependency('libtiff-4', required : false)
> > +
> >  subdir('lc-compliance')
> >  
> >  subdir('cam')
> > diff --git a/src/apps/qcam/meson.build b/src/apps/qcam/meson.build
> > index d5916d0df532..e298101e2c43 100644
> > --- a/src/apps/qcam/meson.build
> > +++ b/src/apps/qcam/meson.build
> > @@ -38,8 +38,7 @@ qcam_resources = files([
> >  
> >  qt5_cpp_args = ['-DQT_NO_KEYWORDS']
> >  
> > -tiff_dep = dependency('libtiff-4', required : false)
> > -if tiff_dep.found()
> > +if libtiff.found()
> >      qt5_cpp_args += ['-DHAVE_TIFF']
> >      qcam_sources += files([
> >          '../cam/dng_writer.cpp',
> > @@ -77,7 +76,7 @@ qcam  = executable('qcam', qcam_sources, resources,
> >                     dependencies : [
> >                         libatomic,
> >                         libcamera_public,
> > +                       libtiff,
> >                         qt5_dep,
> > -                       tiff_dep,
> >                     ],
> >                     cpp_args : qt5_cpp_args)

Patch
diff mbox series

diff --git a/src/apps/cam/meson.build b/src/apps/cam/meson.build
index 4b6099ddab63..297de64fbdd9 100644
--- a/src/apps/cam/meson.build
+++ b/src/apps/cam/meson.build
@@ -24,7 +24,6 @@  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' ]
diff --git a/src/apps/meson.build b/src/apps/meson.build
index 159deb0b7fc2..95f1f5190c7a 100644
--- a/src/apps/meson.build
+++ b/src/apps/meson.build
@@ -8,6 +8,8 @@  if not libevent.found()
     libevent = dependency('libevent_pthreads', required : opt_lc_compliance)
 endif
 
+libtiff = dependency('libtiff-4', required : false)
+
 subdir('lc-compliance')
 
 subdir('cam')
diff --git a/src/apps/qcam/meson.build b/src/apps/qcam/meson.build
index d5916d0df532..e298101e2c43 100644
--- a/src/apps/qcam/meson.build
+++ b/src/apps/qcam/meson.build
@@ -38,8 +38,7 @@  qcam_resources = files([
 
 qt5_cpp_args = ['-DQT_NO_KEYWORDS']
 
-tiff_dep = dependency('libtiff-4', required : false)
-if tiff_dep.found()
+if libtiff.found()
     qt5_cpp_args += ['-DHAVE_TIFF']
     qcam_sources += files([
         '../cam/dng_writer.cpp',
@@ -77,7 +76,7 @@  qcam  = executable('qcam', qcam_sources, resources,
                    dependencies : [
                        libatomic,
                        libcamera_public,
+                       libtiff,
                        qt5_dep,
-                       tiff_dep,
                    ],
                    cpp_args : qt5_cpp_args)