[gnome-photos/wip/rishi/split-library-unbreak] build: Generate library headers before trying to use them



commit 0b2f3223738163878adb11f7a5ba18d160fba037
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Oct 11 20:15:25 2018 +0200

    build: Generate library headers before trying to use them
    
    ... from outside the library.
    
    As suggested by Emmanuele Bassi.
    
    Fallout from 37a598b05b91be5ba3ceeb8c6b7cc1d1eff13a94
    
    https://gitlab.gnome.org/GNOME/gnome-photos/issues/63

 src/meson.build | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/src/meson.build b/src/meson.build
index e677e7f1..645b1d73 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,3 +1,5 @@
+libgnome_photos_built_headers = []
+
 sources = files(
   'photos-debug.c',
   'photos-error.c',
@@ -19,7 +21,7 @@ sources = files(
 
 thumbnailer_dbus = 'photos-thumbnailer-dbus'
 
-sources += gnome.gdbus_codegen(
+libgnome_photos_built_sources_gdbus = gnome.gdbus_codegen(
   thumbnailer_dbus,
   thumbnailer_dbus + '.xml',
   interface_prefix: photos_namespace + '.',
@@ -31,22 +33,28 @@ sources += gnome.gdbus_codegen(
   autocleanup: 'all',
 )
 
+libgnome_photos_built_headers += libgnome_photos_built_sources_gdbus[1]
+sources += libgnome_photos_built_sources_gdbus
+
 enum_headers = files(
   'photos-operation-insta-common.h',
 )
 
 enum = 'photos-enums-gegl'
 
-sources += gnome.mkenums(
+libgnome_photos_built_sources_enums = gnome.mkenums(
   enum,
   sources: enum_headers,
   c_template: enum + '.c.template',
   h_template: enum + '.h.template',
 )
 
+libgnome_photos_built_headers += libgnome_photos_built_sources_enums[1]
+sources += libgnome_photos_built_sources_enums
+
 resource_data = files('../data/vignette.png')
 
-sources += gnome.compile_resources(
+libgnome_photos_built_sources_resources = gnome.compile_resources(
   'photos-resources-gegl',
   'photos-gegl.gresource.xml',
   source_dir: '.',
@@ -55,6 +63,9 @@ sources += gnome.compile_resources(
   export: true,
 )
 
+libgnome_photos_built_headers += libgnome_photos_built_sources_resources[1]
+sources += libgnome_photos_built_sources_resources
+
 deps = [
   babl_dep,
   gegl_dep,
@@ -80,6 +91,7 @@ libgnome_photos = shared_library(
 
 libgnome_photos_dep = declare_dependency(
   link_with: libgnome_photos,
+  sources: libgnome_photos_built_headers,
 )
 
 common_sources = []


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