[devhelp] build: fix a todo comment



commit 66ce3bb92d3a77fee143487500910b42092e2ce3
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Apr 4 01:32:03 2020 +0200

    build: fix a todo comment
    
    This moves the gsettings-desktop-schemas dep to the libdevhelp rather
    than the Devhelp app.
    
    We can now directly use dependency objects in the PKG_CONFIG.generate()
    call.

 devhelp/meson.build |  3 ++-
 meson.build         | 36 +++++++++++++-----------------------
 2 files changed, 15 insertions(+), 24 deletions(-)
---
diff --git a/devhelp/meson.build b/devhelp/meson.build
index aaf96d2c..c9a217f2 100644
--- a/devhelp/meson.build
+++ b/devhelp/meson.build
@@ -123,7 +123,8 @@ PKG_CONFIG.generate(
   version : meson.project_version(),
   libraries : libdevhelp,
   subdirs : install_headers_first_subdir,
-  requires : LIBDEVHELP_DEPS_STR
+  requires : LIBDEVHELP_PUBLIC_DEPS,
+  requires_private : LIBDEVHELP_PRIVATE_DEPS
 )
 
 GNOME.generate_gir(
diff --git a/meson.build b/meson.build
index 6744068a..98788487 100644
--- a/meson.build
+++ b/meson.build
@@ -46,33 +46,23 @@ lt_revision = 2
 lt_age = 0
 LIBDEVHELP_LT_VERSION = '@0@.@1@.@2@'.format(lt_current, lt_revision, lt_age)
 
-libdevhelp_deps_array = [
-  ['gio-2.0', '>= 2.64'],
-  ['gtk+-3.0', '>= 3.22'],
-  ['webkit2gtk-4.0', '>= 2.26']
+LIBDEVHELP_PUBLIC_DEPS = [
+  dependency('gio-2.0', version: '>= 2.64'),
+  dependency('gtk+-3.0', version: '>= 3.22'),
+  dependency('webkit2gtk-4.0', version: '>= 2.26'),
+]
+LIBDEVHELP_PRIVATE_DEPS = [
+  dependency('gsettings-desktop-schemas'),
+]
+LIBDEVHELP_DEPS = [
+  LIBDEVHELP_PUBLIC_DEPS,
+  LIBDEVHELP_PRIVATE_DEPS,
+  meson.get_compiler('c').find_library('m'),
 ]
-
-LIBDEVHELP_DEPS_STR = []
-LIBDEVHELP_DEPS = [meson.get_compiler('c').find_library('m')]
-foreach dep : libdevhelp_deps_array
-  dep_name = dep[0]
-  dep_version = dep[1]
-  LIBDEVHELP_DEPS_STR += '@0@ @1@'.format(dep_name, dep_version)
-  LIBDEVHELP_DEPS += dependency(dep_name, version : dep_version)
-endforeach
 
 DEVHELP_APP_DEPS = [
   LIBDEVHELP_DEPS,
-  dependency('amtk-5', version : '>= 5.0'),
-  # TODO: move gsettings-desktop-schemas dep for the libdevhelp, in the
-  # *.pc file it must be a private dep. With meson 0.47 there is no clean
-  # and generic way to do it :-( Clean: no information duplication (to
-  # create both the list of dependency objects plus creating the *.pc
-  # file). Generic: declare the dependencies public/private, with/without
-  # version requirements. Without the need to copy/paste a chunk of build
-  # code from one project to another (i.e. have something short and
-  # simple, like with the AX_PKG_CHECK_MODULES Autotools macro).
-  dependency('gsettings-desktop-schemas'),
+  dependency('amtk-5', version: '>= 5.0'),
 ]
 
 # config.h


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