[sysprof] build: only install some files when option is enabled



commit 189505be64855573d814c0d0e3fdc80648f79e30
Author: Christian Hergert <chergert redhat com>
Date:   Tue Oct 15 14:49:57 2019 -0700

    build: only install some files when option is enabled
    
    Fixes #16

 data/meson.build | 46 ++++++++++++++++++++++++----------------------
 src/meson.build  | 17 ++++++++++++-----
 2 files changed, 36 insertions(+), 27 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index c171c77..d70ea58 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,33 +1,35 @@
-install_data('sysprof-mime.xml',
-  install_dir: join_paths(datadir, 'mime/packages')
-)
+if get_option('enable_gtk') and get_option('libsysprof')
 
-install_data('org.gnome.sysprof3.gschema.xml',
-  install_dir: join_paths(datadir, 'glib-2.0/schemas')
-)
+  install_data('sysprof-mime.xml',
+    install_dir: join_paths(datadir, 'mime/packages')
+  )
 
-i18n.merge_file(
-          input: 'org.gnome.Sysprof3.appdata.xml.in',
-         output: 'org.gnome.Sysprof3.appdata.xml',
-         po_dir: podir,
-        install: true,
-    install_dir: join_paths(datadir, 'metainfo')
-)
+  install_data('org.gnome.sysprof3.gschema.xml',
+    install_dir: join_paths(datadir, 'glib-2.0/schemas')
+  )
 
-i18n.merge_file(
-          input: 'org.gnome.Sysprof3.desktop.in',
-         output: 'org.gnome.Sysprof3.desktop',
-           type: 'desktop',
-         po_dir: podir,
-        install: true,
-    install_dir: join_paths(datadir, 'applications')
-)
+  i18n.merge_file(
+            input: 'org.gnome.Sysprof3.appdata.xml.in',
+           output: 'org.gnome.Sysprof3.appdata.xml',
+           po_dir: podir,
+          install: true,
+      install_dir: join_paths(datadir, 'metainfo')
+  )
+
+  i18n.merge_file(
+            input: 'org.gnome.Sysprof3.desktop.in',
+           output: 'org.gnome.Sysprof3.desktop',
+             type: 'desktop',
+           po_dir: podir,
+          install: true,
+      install_dir: join_paths(datadir, 'applications')
+  )
 
-if get_option('enable_gtk')
   icon_sizes = ['scalable', 'symbolic']
   foreach size: icon_sizes
     install_subdir('icons/' + size,
       install_dir: join_paths(datadir, 'icons/hicolor')
     )
   endforeach
+
 endif
diff --git a/src/meson.build b/src/meson.build
index b32cd50..f464cbb 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -25,11 +25,18 @@ ipc_legacy_src = gnome.gdbus_codegen('ipc-legacy',
          namespace: 'IpcLegacy',
 )
 
-install_data(['org.gnome.Sysprof3.Profiler.xml',
-              'org.gnome.Sysprof3.Service.xml',
-              'org.gnome.Sysprof2.xml'],
-  install_dir: join_paths(datadir, 'dbus-1/interfaces'),
-)
+if get_option('with_sysprofd') == 'bundled'
+  install_data(['org.gnome.Sysprof3.Service.xml',
+                'org.gnome.Sysprof2.xml'],
+    install_dir: join_paths(datadir, 'dbus-1/interfaces'),
+  )
+endif
+
+if get_option('libsysprof')
+  install_data(['org.gnome.Sysprof3.Profiler.xml'],
+    install_dir: join_paths(datadir, 'dbus-1/interfaces'),
+  )
+endif
 
 ipc_include_dirs = include_directories('.')
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]