[gnome-weather] meson: use the pkg-config file to look for gjs-console



commit 73257a9eb82f477449a243de8ae68c21cf07c4d0
Author: Artturin <Artturin artturin com>
Date:   Fri Sep 2 22:41:02 2022 +0300

    meson: use the pkg-config file to look for gjs-console
    
    find_program looks for programs for the build machine
    
    the pkg-config file will contain a variable for the host machine gjs-console

 meson.build     | 2 +-
 src/meson.build | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 09ee938..ab6485a 100644
--- a/meson.build
+++ b/meson.build
@@ -10,7 +10,7 @@ gnome = import('gnome')
 dependency('glib-2.0')
 dependency('gobject-introspection-1.0', version: '>=1.35.9')
 dependency('gtk4', version :'>=4.5')
-dependency('gjs-1.0', version: '>= 1.71.0')
+gjs = dependency('gjs-1.0', version: '>= 1.71.0')
 dependency('libgeoclue-2.0', version: '>= 0.12.99')
 dependency('libadwaita-1', version: '>=  1.2.alpha')
 dependency('gweather4', version: '>= 3.90.0')
diff --git a/src/meson.build b/src/meson.build
index 3d89a92..1b73470 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,5 +1,5 @@
 source_conf = configuration_data()
-source_conf.set('GJS', find_program('gjs').path())
+source_conf.set('GJS', gjs.get_variable(pkgconfig: 'gjs_console'))
 source_conf.set('VERSION', meson.project_version() + version_suffix)
 source_conf.set('APP_ID', weather_id)
 source_conf.set('libdir', weather_extensiondir)


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