[gnome-software] lib: Respect the per-user or per-system install preferences



commit 2f3989b89dbc7b16ed7064e7009d04ad9eccf131
Author: Richard Hughes <richard hughsie com>
Date:   Mon Jul 10 17:56:40 2017 +0100

    lib: Respect the per-user or per-system install preferences
    
    The root cause of this was that were were failing to actually use the polkit
    functionality as a config.h define was missing. This meant that all installs
    were forced to user-installs and a only tiny warning was added to the verbose
    logs in early startup.

 lib/meson.build |   28 +++++++++++++++++-----------
 meson.build     |    1 +
 2 files changed, 18 insertions(+), 11 deletions(-)
---
diff --git a/lib/meson.build b/lib/meson.build
index 7d910ec..92c92ac 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -53,6 +53,22 @@ install_headers([
   subdir : 'gnome-software'
 )
 
+librarydeps = [
+  appstream_glib,
+  gio_unix,
+  gmodule,
+  gtk,
+  json_glib,
+  libm,
+  libsecret,
+  libsoup,
+  valgrind,
+]
+
+if get_option('enable-polkit')
+  librarydeps += polkit
+endif
+
 libgnomesoftware = static_library(
   'libgnomesoftware',
   sources : [
@@ -74,17 +90,7 @@ libgnomesoftware = static_library(
   include_directories : [
     include_directories('..'),
   ],
-  dependencies : [
-    appstream_glib,
-    gio_unix,
-    gmodule,
-    gtk,
-    json_glib,
-    libm,
-    libsecret,
-    libsoup,
-    valgrind,
-  ],
+  dependencies : librarydeps,
   c_args : cargs,
 )
 
diff --git a/meson.build b/meson.build
index 717bd65..af7247a 100644
--- a/meson.build
+++ b/meson.build
@@ -126,6 +126,7 @@ endif
 
 if get_option('enable-polkit')
   polkit = dependency('polkit-gobject-1')
+  conf.set('HAVE_POLKIT', 1)
 endif
 
 if get_option('enable-ostree')


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