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



commit 93970e62aac6bafd3d9ecd5bbbf503b0ed03ca7e
Author: Artturin <Artturin artturin com>
Date:   Fri Sep 2 22:25:40 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     | 3 +--
 src/meson.build | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index a2f6f9f..dd86b2c 100644
--- a/meson.build
+++ b/meson.build
@@ -43,8 +43,7 @@ if dbus_service_dir == ''
   dbus_service_dir = join_paths(characters_datadir, 'dbus-1', 'services')
 endif
 
-# Just check that gjs-1.0 is present and recent enough
-dependency('gjs-1.0', version: '>= 1.50')
+gjs = dependency('gjs-1.0', version: '>= 1.50')
 dependency('gtk4', version: '>=4.6')
 libhandy = dependency ('libadwaita-1', version: '>= 1.2.alpha')
 
diff --git a/src/meson.build b/src/meson.build
index d9cb676..a14e667 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,5 +1,5 @@
 script_conf = configuration_data()
-script_conf.set('GJS', find_program('gjs').path())
+script_conf.set('GJS', gjs.get_variable(pkgconfig: 'gjs_console'))
 script_conf.set('PACKAGE_VERSION', characters_version)
 script_conf.set('appid', application_id)
 script_conf.set('libdir', characters_libdir)


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