[virt-tools-list] [PATCH 03/12] msi: use libgovirt conditionally

Fabiano Fidêncio fidencio at redhat.com
Tue Dec 23 00:01:56 UTC 2014


Only include libgovirt as dep when it's explicitly done in the configure.
---
 data/Makefile.am        | 7 +++++++
 data/virt-viewer.wxs.in | 8 ++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/data/Makefile.am b/data/Makefile.am
index 5f1e4ee..4c5ff2c 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -22,6 +22,12 @@ else
 HaveLibvirt = False
 endif
 
+if HAVE_OVIRT
+HaveOVirt = True
+else
+HaveOVirt = False
+endif
+
 deps.txt:
 	$(AM_V_GEN)rpm -qa | grep $(host_os) | sort | unix2dos > $@
 
@@ -47,6 +53,7 @@ virt-viewer-$(WIXL_ARCH)-$(VERSION).msi: virt-viewer.wxs deps.txt
              -D DESTDIR=$$DESTDIR$(prefix)				\
              -D GtkVersion=$(GTK_API_VERSION)				\
              -D HaveLibvirt=$(HaveLibvirt)				\
+             -D HaveOVirt=$(HaveOVirt)					\
              --arch $(WIXL_ARCH)					\
              -o $@							\
 	     $< virt-viewer-files.wxs &&				\
diff --git a/data/virt-viewer.wxs.in b/data/virt-viewer.wxs.in
index 3db7813..d9af0e9 100644
--- a/data/virt-viewer.wxs.in
+++ b/data/virt-viewer.wxs.in
@@ -27,7 +27,9 @@
   <?if $(var.HaveLibvirt) = "True"?>
     <?require libvirt.wxi?>
   <?endif?>
-  <?require libgovirt.wxi?>
+  <?if $(var.HaveOVirt) = "True"?>
+    <?require libgovirt.wxi?>
+  <?endif?>
 
   <?define UpgradeCode = "5B027138-1A63-49E6-877E-055E5EEC1903"?>
   <Product Id="*"
@@ -132,7 +134,9 @@
       <?if $(var.HaveLibvirt) = "True"?>
         <ComponentGroupRef Id="CG.libvirt"/>
       <?endif?>
-      <ComponentGroupRef Id="CG.libgovirt"/>
+      <?if $(var.HaveOVirt) = "True"?>
+        <ComponentGroupRef Id="CG.libgovirt"/>
+      <?endif?>
       <ComponentGroupRef Id="CG.virt-viewer"/>
       <ComponentRef Id="CDepsFile"/>
       <ComponentRef Id="CShortcut"/>
-- 
2.1.0




More information about the virt-tools-list mailing list