[spice-gtk,v4,18/29] build: Do not build usbredir dependent file is usbredir disabled

Submitted by Frediano Ziglio on Aug. 27, 2019, 9:22 a.m.

Details

Message ID 20190827092246.10276-19-fziglio@redhat.com
State Superseded
Headers show
Series "added feature of sharing CD image" ( rev: 6 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Aug. 27, 2019, 9:22 a.m.
These files would end up to compile empty code, no reason
to compile and link them.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 src/meson.build | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/meson.build b/src/meson.build
index 00eb2778..0461dea6 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -119,11 +119,6 @@  spice_client_glib_sources = [
   'spice-uri-priv.h',
   'spice-util-priv.h',
   'usb-device-manager-priv.h',
-  'usbutil.c',
-  'usbutil.h',
-  'usb-backend.c',
-  'usb-emulation.h',
-  'usb-backend.h',
   'vmcstream.c',
   'vmcstream.h',
 ]
@@ -159,6 +154,11 @@  endif
 
 if spice_gtk_has_usbredir
   spice_client_glib_sources += [
+    'usbutil.c',
+    'usbutil.h',
+    'usb-backend.c',
+    'usb-emulation.h',
+    'usb-backend.h',
     'usb-device-cd.c',
     'usb-device-cd.h',
     'cd-scsi.c',

Comments


> 
> Hi,
> 
> On Tue, Aug 27, 2019 at 10:22:35AM +0100, Frediano Ziglio wrote:
> > These files would end up to compile empty code, no reason
> > to compile and link them.
> > 
> > Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
> > ---
> >  src/meson.build | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/src/meson.build b/src/meson.build
> > index 00eb2778..0461dea6 100644
> > --- a/src/meson.build
> > +++ b/src/meson.build
> > @@ -119,11 +119,6 @@ spice_client_glib_sources = [
> >    'spice-uri-priv.h',
> >    'spice-util-priv.h',
> >    'usb-device-manager-priv.h',
> > -  'usbutil.c',
> > -  'usbutil.h',
> > -  'usb-backend.c',
> > -  'usb-emulation.h',
> > -  'usb-backend.h',
> >    'vmcstream.c',
> >    'vmcstream.h',
> >  ]
> > @@ -159,6 +154,11 @@ endif
> >  
> >  if spice_gtk_has_usbredir
> >    spice_client_glib_sources += [
> > +    'usbutil.c',
> > +    'usbutil.h',
> > +    'usb-backend.c',
> > +    'usb-emulation.h',
> > +    'usb-backend.h',
> 
> You should be able to remove some ifdef/endif USE_USBREDIR now,
> probably should be in the same patch
> 

Yes, I'll do it

> >      'usb-device-cd.c',
> >      'usb-device-cd.h',
> >      'cd-scsi.c',

Frediano