# HG changeset patch
# Node ID f0237c26e229
# Parent  ebabd7682683
diff --git a/talkatu/meson.build b/talkatu/meson.build
--- a/talkatu/meson.build
+++ b/talkatu/meson.build
@@ -89,11 +89,15 @@
 	# Modified below.
 ]
 
+TALKATU_GENERATED_TARGETS = [
+	# Modified below.
+]
+
 TALKATU_ENUM_HEADERS = [
-    'talkatubuffer.h',
-    'talkatumessage.h',
-    'talkatutag.h',
-    'talkatuinput.h',
+	'talkatubuffer.h',
+	'talkatumessage.h',
+	'talkatutag.h',
+	'talkatuinput.h',
 ]
 
 ###############################################################################
@@ -109,11 +113,11 @@
 # talkatuversion.h
 ###############################################################################
 talkatuversion_h = configure_file(
-    input : 'talkatuversion.h.in',
-    output : 'talkatuversion.h',
-    configuration : version_conf,
-    install : true,
-    install_dir : get_option('includedir') / 'talkatu-1.0/talkatu')
+	input : 'talkatuversion.h.in',
+	output : 'talkatuversion.h',
+	configuration : version_conf,
+	install : true,
+	install_dir : get_option('includedir') / 'talkatu-1.0/talkatu')
 
 TALKATU_PUBLIC_BUILT_HEADERS += [talkatuversion_h]
 
@@ -138,25 +142,25 @@
 TALKATU_H_INCLUDES = ''
 
 foreach header : TALKATU_HEADERS
-    TALKATU_H_INCLUDES = '@0@\n#include <talkatu/@1@>'.format(
-        TALKATU_H_INCLUDES,
-        header)
+	TALKATU_H_INCLUDES = '@0@\n#include <talkatu/@1@>'.format(
+		TALKATU_H_INCLUDES,
+		header)
 endforeach
 
 foreach header : ['talkatuenums.h', 'talkatuversion.h']
-    TALKATU_H_INCLUDES = '@0@\n#include <talkatu/@1@>'.format(
-        TALKATU_H_INCLUDES,
-        header)
+	TALKATU_H_INCLUDES = '@0@\n#include <talkatu/@1@>'.format(
+		TALKATU_H_INCLUDES,
+		header)
 endforeach
 
 conf = configuration_data()
 conf.set('TALKATU_H_INCLUDES', TALKATU_H_INCLUDES)
 talkatu_h = configure_file(
-    input : 'talkatu.h.in',
-    output : 'talkatu.h',
-    configuration : conf,
-    install : true,
-    install_dir : get_option('includedir') / 'talkatu-1.0')
+	input : 'talkatu.h.in',
+	output : 'talkatu.h',
+	configuration : conf,
+	install : true,
+	install_dir : get_option('includedir') / 'talkatu-1.0')
 
 ###############################################################################
 # Glade Catalog
@@ -190,28 +194,14 @@
 
 talkatu_inc = include_directories('.')
 
-talkatu_dep = declare_dependency(
-	include_directories : [toplevel_inc, talkatu_inc],
-	link_with : talkatu,
-	sources : TALKATU_PUBLIC_BUILT_HEADERS,  # Ensure they're built before use.
-	dependencies : [GLIB, GOBJECT, GTK3]
-)
-
-if meson.version().version_compare('>=0.54.0')
-	meson.override_dependency('talkatu', talkatu_dep)
-endif
-
 pkgconfig.generate(
-  name : 'libtalkatu',
-  description : 'A set of instant message related widgets',
-  version : meson.project_version(),
-  filebase : 'talkatu',
-  subdirs : 'talkatu-1.0',
-  libraries : talkatu,
-  requires : ['glib-2.0', 'gobject-2.0', 'gmodule-2.0', 'gtk+-3.0'],
-  variables : [
-    'plugindir=${libdir}',
-  ],
+	name : 'talkatu',
+	description : 'A set of instant message related widgets',
+	version : meson.project_version(),
+	filebase : 'talkatu',
+	subdirs : 'talkatu-1.0',
+	libraries : talkatu,
+	requires : ['glib-2.0', 'gobject-2.0', 'gtk+-3.0'],
 )
 
 ###############################################################################
@@ -228,9 +218,22 @@
 		nsversion : '@0@.0'.format(TALKATU_MAJOR_VERSION),
 		extra_args : ['--quiet', '--warn-all', '-DTALKATU_COMPILATION'],
 		install : true)
+	TALKATU_GENERATED_TARGETS += talkatu_gir
 endif
 
-subdir('tests')
+###############################################################################
+# Library Dependency Object
+###############################################################################
+talkatu_dep = declare_dependency(
+	include_directories : [toplevel_inc, talkatu_inc],
+	link_with : talkatu,
+	sources : TALKATU_PUBLIC_BUILT_HEADERS + TALKATU_GENERATED_TARGETS,
+	dependencies : [GLIB, GOBJECT, GTK3]
+)
+
+if meson.version().version_compare('>=0.54.0')
+	meson.override_dependency('talkatu', talkatu_dep)
+endif
 
 ###############################################################################
 # Install Stuff
@@ -242,8 +245,10 @@
 )
 
 ###############################################################################
-# Docs
+# Subdirectories
 ###############################################################################
+subdir('tests')
+
 if get_option('doc')
 	subdir('reference')
 endif
