[rygel/wip/meson: 80/85] meson: Fix dependency issues for GIR generation



commit dfb13c0fafda224b6accaa3413d1dd089f3512a1
Author: Jens Georg <mail jensge org>
Date:   Sun Sep 9 14:19:35 2018 +0200

    meson: Fix dependency issues for GIR generation

 src/librygel-core/meson.build         | 21 +++++++++++----------
 src/librygel-renderer-gst/meson.build | 31 +++++++++++++++----------------
 src/librygel-renderer/meson.build     | 31 ++++++++++++++++---------------
 src/librygel-server/meson.build       | 29 ++++++++++++++---------------
 4 files changed, 56 insertions(+), 56 deletions(-)
---
diff --git a/src/librygel-core/meson.build b/src/librygel-core/meson.build
index 4b61c2e7..e586dbff 100644
--- a/src/librygel-core/meson.build
+++ b/src/librygel-core/meson.build
@@ -46,24 +46,25 @@ core_lib = library('rygel-core-2.6', core_sources,
         install_dir : [true, rygel_includedir, true, false])
 install_data('rygel-core-2.6.deps', install_dir : rygel_vapidir)
 
-custom_target('RygelCore-2.6.typelib',
-               command: [g_ir_compiler, '--output', '@OUTPUT@', '@INPUT@'],
-               output: 'RygelCore-2.6.typelib',
-               input: 'RygelCore-2.6.gir',
-               depends: core_lib,
-               install: true,
-               install_dir: typelib_dir)
+foo_01 = declare_dependency(link_with : core_lib)
 
-custom_target('RygelCore-2.6.gir',
+core_gir = custom_target('RygelCore-2.6.gir',
               command: [sed, '-e', 's,Rygel[.],RygelCore.,g',
                         '-e', 's,namespace name="Rygel",namespace name="RygelCore",g',
-                        '@INPUT@'],
-              input: 'Rygel-2.6.gir',
+                        join_paths(meson.current_build_dir(), 'Rygel-2.6.gir')],
+              depends: core_lib,
               output: 'RygelCore-2.6.gir',
               capture: true,
               install: true,
               install_dir: gir_dir)
 
+custom_target('RygelCore-2.6.typelib',
+               command: [g_ir_compiler, '--output', '@OUTPUT@', join_paths(meson.current_build_dir(), 
'RygelCore-2.6.gir')],
+               output: 'RygelCore-2.6.typelib',
+               depends: core_gir,
+               install: true,
+               install_dir: typelib_dir)
+
 # need to add to get the current build dir as include dir
 rygel_core = declare_dependency(include_directories: include_directories('.'),
                                 dependencies: core_deps,
diff --git a/src/librygel-renderer-gst/meson.build b/src/librygel-renderer-gst/meson.build
index 88e5b708..fddef8ef 100644
--- a/src/librygel-renderer-gst/meson.build
+++ b/src/librygel-renderer-gst/meson.build
@@ -13,31 +13,30 @@ renderer_gst_lib = library('rygel-renderer-gst-2.6', renderer_gst_sources,
         install_dir : [true, rygel_includedir, true, false])
 install_data('rygel-renderer-gst-2.6.deps', install_dir : rygel_vapidir)
 
-custom_target('RygelRendererGst-2.6.typelib',
-               command: [g_ir_compiler,
-                        '--output', '@OUTPUT@',
-                        '--includedir', core_girdir,
-                        '--includedir', renderer_girdir,
-                        '@INPUT@'],
-               output: 'RygelRendererGst-2.6.typelib',
-               input: 'RygelRendererGst-2.6.gir',
-               depends: [renderer_gst_lib, renderer_lib],
-               install: true,
-               install_dir: typelib_dir)
-
-custom_target('RygelRendererGst-2.6.gir',
+renderer_gst_gir = custom_target('RygelRendererGst-2.6.gir',
               command: [sed, '-e', 's,Rygel[.],RygelRendererGst.,g',
                              '-e', 's,RygelRendererGst[.]MediaRenderer,RygelRenderer.MediaRenderer,g',
                              '-e', 's,RygelRendererGst[.]MediaPlayer,RygelRenderer.MediaPlayer,g',
                              '-e', 's,namespace name="Rygel",namespace name="RygelRendererGst",g',
                              '-e', 's,RygelRendererGst[.]Plugin,RygelCore.Plugin,g',
                              '-e', 's,<package name="rygel-renderer-gst-2.6"/>,<include name="RygelCore" 
version="2.6"/><include name="RygelRenderer" version="2.6"/><package name="rygel-renderer-gst-2.6"/>,',
-                        '@INPUT@'],
-              input: 'Rygel-2.6.gir',
+                        join_paths(meson.current_build_dir(), 'Rygel-2.6.gir')],
               output: 'RygelRendererGst-2.6.gir',
+              depends: renderer_gst_lib,
               capture: true,
               install: true,
-              install_dir: join_paths(get_option('datadir'),'gir-1.0'))
+              install_dir: gir_dir)
+
+custom_target('RygelRendererGst-2.6.typelib',
+               command: [g_ir_compiler,
+                        '--output', '@OUTPUT@',
+                        '--includedir', core_girdir,
+                        '--includedir', renderer_girdir,
+                        join_paths(meson.current_build_dir(), 'RygelRendererGst-2.6.gir')],
+               output: 'RygelRendererGst-2.6.typelib',
+               depends: [renderer_gst_lib, renderer_lib, renderer_gst_gir],
+               install: true,
+               install_dir: typelib_dir)
 
 rygel_renderer_gst = declare_dependency(include_directories : include_directories('.'),
                                         dependencies : renderer_gst_deps,
diff --git a/src/librygel-renderer/meson.build b/src/librygel-renderer/meson.build
index 1d8997c6..68c8c0d8 100644
--- a/src/librygel-renderer/meson.build
+++ b/src/librygel-renderer/meson.build
@@ -21,29 +21,30 @@ renderer_lib = library('rygel-renderer-2.6', renderer_sources,
         install_dir : [true, rygel_includedir, true, false])
 install_data('rygel-renderer-2.6.deps', install_dir : rygel_vapidir)
 
-custom_target('RygelRenderer-2.6.typelib',
-               command: [g_ir_compiler,
-                        '--output', '@OUTPUT@',
-                        '--includedir', core_girdir,
-                        '@INPUT@'],
-               output: 'RygelRenderer-2.6.typelib',
-               input: 'RygelRenderer-2.6.gir',
-               depends: renderer_lib,
-               install: true,
-               install_dir: typelib_dir)
-
-custom_target('RygelRenderer-2.6.gir',
+renderer_gir = custom_target('RygelRenderer-2.6.gir',
               command: [sed, '-e', 's,Rygel[.],RygelRenderer.,g',
                                           '-e', 's,namespace name="Rygel",namespace name="RygelRenderer",g',
                                           '-e', 's,RygelRenderer[.]Plugin,RygelCore.Plugin,g',
                                           '-e', 's,RygelRenderer[.]MediaDevice,RygelCore.MediaDevice,g',
                                           '-e', 's|<package name="rygel-renderer-2.6"/>|<include 
name="RygelCore" version="2.6"/><package name="rygel-renderer-2.6"/>|',
-                        '@INPUT@'],
-              input: 'Rygel-2.6.gir',
+                        join_paths(meson.current_build_dir(), 'Rygel-2.6.gir')],
               output: 'RygelRenderer-2.6.gir',
+              depends: renderer_lib,
               capture: true,
               install: true,
-              install_dir: join_paths(get_option('datadir'),'gir-1.0'))
+              install_dir: gir_dir)
+
+custom_target('RygelRenderer-2.6.typelib',
+               command: [g_ir_compiler,
+                        '--output', '@OUTPUT@',
+                        '--includedir', core_girdir,
+                        join_paths(meson.current_build_dir(), 'RygelRenderer-2.6.gir')],
+               output: 'RygelRenderer-2.6.typelib',
+               depends: renderer_gir,
+               install: true,
+               install_dir: typelib_dir)
+
+
 rygel_renderer = declare_dependency(include_directories : include_directories('.'),
                                     dependencies : renderer_deps,
                                     link_with: renderer_lib)
diff --git a/src/librygel-server/meson.build b/src/librygel-server/meson.build
index aa0b948a..aa1237bc 100644
--- a/src/librygel-server/meson.build
+++ b/src/librygel-server/meson.build
@@ -99,30 +99,29 @@ server_lib = library('rygel-server-2.6', server_sources,
         install_dir : [true, rygel_includedir, true, false])
 install_data('rygel-server-2.6.deps', install_dir : rygel_vapidir)
 
-custom_target('RygelServer-2.6.typelib',
-               command: [g_ir_compiler,
-                        '--output', '@OUTPUT@',
-                        '--includedir', core_girdir,
-                        '@INPUT@'],
-               output: 'RygelServer-2.6.typelib',
-               input: 'RygelServer-2.6.gir',
-               depends: server_lib,
-               install: true,
-               install_dir: typelib_dir)
-
-custom_target('RygelServer-2.6.gir',
-              command: [sed, '-e', 's,Rygel\.,RygelServer.,g',
+server_gir = custom_target('RygelServer-2.6.gir',
+              command: [sed, '-e', 's,Rygel[.],RygelServer.,g',
                                           '-e', 's,namespace name="Rygel",namespace name="RygelServer",g',
                                           '-e', 's,RygelServer[.]Plugin,RygelCore.Plugin,g',
                                           '-e', 's,RygelServer[.]MediaDevice,RygelCore.MediaDevice,g',
                                           '-e', 's|<package name="rygel-server-2.6"/>|<include 
name="RygelCore" version="2.6"/><package name="rygel-server-2.6"/>|',
-                        '@INPUT@'],
-              input: 'Rygel-2.6.gir',
+                        join_paths(meson.current_build_dir(), 'Rygel-2.6.gir')],
               output: 'RygelServer-2.6.gir',
               capture: true,
+              depends: server_lib,
               install: true,
               install_dir: join_paths(get_option('datadir'),'gir-1.0'))
 
+custom_target('RygelServer-2.6.typelib',
+               command: [g_ir_compiler,
+                        '--output', '@OUTPUT@',
+                        '--includedir', core_girdir,
+                        join_paths(meson.current_build_dir(), 'RygelServer-2.6.gir')],
+               output: 'RygelServer-2.6.typelib',
+               depends: server_gir,
+               install: true,
+               install_dir: typelib_dir)
+
 # need to add to get the current build dir as include dir
 rygel_server = declare_dependency(include_directories: include_directories('.'),
                                   dependencies : server_deps,


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