[rhythmbox] build: simplify metadata build



commit ee31ec401ddfe7660133f4c5818d734bd0635d9b
Author: Jonathan Matthew <jonathan d14n org>
Date:   Fri Nov 5 22:37:52 2021 +1000

    build: simplify metadata build
    
    link the test program against just the metadata library so it can be
    built in the metadata dir rather than the top level, just compile
    all the service side bits into rhythmbox-metadata since they're only
    used in one place, and explicitly include the metadata client library in
    librhythmbox-core.

 meson.build          |  8 --------
 metadata/meson.build | 21 +++++++++++----------
 shell/meson.build    |  2 +-
 3 files changed, 12 insertions(+), 19 deletions(-)
---
diff --git a/meson.build b/meson.build
index 0f3769e8a..8a7d56bfe 100644
--- a/meson.build
+++ b/meson.build
@@ -324,11 +324,3 @@ if get_option('help')
   subdir('help')
 endif
 
-# Some tests that can't be defined in the subdirs because rhythmbox_core_dep
-# must be defined first.
-
-test_metadata = executable('test-metadata',
-  'metadata/test-metadata.c',
-  dependencies: rhythmbox_core_dep)
-test('test-metadata', test_metadata)
-
diff --git a/metadata/meson.build b/metadata/meson.build
index 2c497d8e1..fbbe68e90 100644
--- a/metadata/meson.build
+++ b/metadata/meson.build
@@ -17,14 +17,11 @@ metadata_sources = files(
 metadata_service_sources = [
   'rb-metadata-common.c',
   'rb-metadata-dbus.c',
+  'rb-metadata-dbus-service.c',
   'rb-metadata-gst.c',
   'rb-metadata-gst-common.c'
 ]
 
-metadata_dbus_service_sources = [
-  'rb-metadata-dbus-service.c'
-]
-
 full_libexecdir = get_option('prefix') / get_option('libexecdir')
 metadata_c_args = [
   '-DGNOMELOCALEDIR="' + datadir + '/locale"',
@@ -58,13 +55,17 @@ rbmetadata_dep = declare_dependency(
 
 # service
 
-rbmetadatasvc_lib = static_library('rbmetadatasvc', metadata_service_sources,
-  dependencies: [librb_dep, rbmetadata_dep, gtk])
-
-executable('rhythmbox-metadata', metadata_dbus_service_sources,
-  link_with: rbmetadatasvc_lib,
-  dependencies: [librb_dep, rbmetadata_dep, gtk],
+executable('rhythmbox-metadata', metadata_service_sources,
+  link_with: rbmetadata_lib,
+  dependencies: [librb_dep, rbmetadata_dep],
   install: true,
   install_dir: get_option('libexecdir'),
   install_rpath: rpath
 )
+
+# test program
+
+executable('test-metadata', 'test-metadata.c',
+  link_with: rbmetadata_lib,
+  dependencies: [librb_dep, rbmetadata_dep],
+)
diff --git a/shell/meson.build b/shell/meson.build
index bb4b624e3..8cf877d5e 100644
--- a/shell/meson.build
+++ b/shell/meson.build
@@ -94,7 +94,7 @@ librhythmbox_core = shared_library('rhythmbox-core',
   c_args: shell_c_args,
   include_directories: rhythmbox_core_include_directories,
   dependencies: [rhythmbox_core_dependencies,  mediaplayerid_dep, rhythmdb_dep,
-    rbbackends_dep, rbpodcast_dep, rbwidgets_dep, sources_dep],
+    rbbackends_dep, rbmetadata_dep, rbpodcast_dep, rbwidgets_dep, sources_dep],
   install: 'true',
   link_whole: [librb, rbwidgets_lib, sources_lib],
   version: '@0@.@1@.@2@'.format(RHYTHMBOX_CORE_CURRENT, RHYTHMBOX_CORE_REVISION, RHYTHMBOX_CORE_AGE)


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