diff --git a/js/misc/config.js.in b/js/misc/config.js.in index f296275ca..28bff96e4 100644 --- a/js/misc/config.js.in +++ b/js/misc/config.js.in @@ -14,6 +14,6 @@ var GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@'; var LOCALEDIR = '@datadir@/locale'; /* other standard directories */ var LIBEXECDIR = '@libexecdir@'; -var NMPREFIXDIR = '@nmprefixdir@'; +var VPNDIR = '@vpndir@'; /* g-i package versions */ var LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@' diff --git a/js/misc/meson.build b/js/misc/meson.build index bbdc0411e..5a4871762 100644 --- a/js/misc/meson.build +++ b/js/misc/meson.build @@ -7,7 +7,7 @@ jsconf.set10('HAVE_BLUETOOTH', bt_dep.found()) jsconf.set10('HAVE_NETWORKMANAGER', have_networkmanager) jsconf.set('datadir', datadir) jsconf.set('libexecdir', libexecdir) -jsconf.set('nmprefixdir', nm_prefix) +jsconf.set('vpndir', vpndir) config_js = configure_file( input: 'config.js.in', diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js index 6b6c31730..26cb24758 100644 --- a/js/ui/components/networkAgent.js +++ b/js/ui/components/networkAgent.js @@ -594,7 +594,7 @@ var NetworkAgent = new Lang.Class({ this._vpnRequests = { }; this._notifications = { }; - this._pluginDir = Gio.file_new_for_path(GLib.build_filenamev([Config.NMPREFIXDIR, 'lib/NetworkManager/VPN'])); + this._pluginDir = Gio.file_new_for_path(Config.VPNDIR); try { let monitor = this._pluginDir.monitor(Gio.FileMonitorFlags.NONE, null); monitor.connect('changed', () => { this._vpnCacheBuilt = false; }); diff --git a/meson.build b/meson.build index a0aafa205..7918fb30c 100644 --- a/meson.build +++ b/meson.build @@ -105,16 +105,13 @@ if get_option('networkmanager') nm_deps += dependency('libnm', version: nm_req) nm_deps += dependency('libsecret-1', version: secret_req) + vpndir = nm_deps[0].get_pkgconfig_variable('vpnservicedir') + have_networkmanager = true else - have_networkmanager = false -endif + vpndir = prefix -networkmanager_dep = dependency('NetworkManager', required: false) -if (networkmanager_dep.found()) - nm_prefix = networkmanager_dep.get_pkgconfig_variable('prefix') -else - nm_prefix = prefix + have_networkmanager = false endif if get_option('systemd')