[gnome-todo/gnome-3-26] project: reorganize meson files



commit e958a20ab766a4f6e04cd25d59861b4fdb998360
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Sep 19 23:16:19 2017 -0300

    project: reorganize meson files
    
    Now we don't need subdirectories in the include directory.

 meson.build                                        |   16 +--
 plugins/background/gtd-plugin-background.h         |    3 +-
 plugins/background/meson.build                     |   12 +-
 plugins/dark-theme/gtd-plugin-dark-theme.h         |    3 +-
 plugins/eds/gtd-plugin-eds.h                       |    3 +-
 plugins/eds/gtd-provider-eds.h                     |    3 +-
 plugins/eds/gtd-provider-goa.h                     |    2 +-
 plugins/eds/gtd-provider-local.h                   |    2 +-
 plugins/eds/gtd-task-list-eds.h                    |    3 +-
 plugins/scheduled-panel/gtd-panel-scheduled.c      |    3 +-
 .../scheduled-panel/gtd-plugin-scheduled-panel.h   |    3 +-
 plugins/today-panel/gtd-panel-today.c              |    2 +-
 plugins/today-panel/gtd-plugin-today-panel.h       |    3 +-
 plugins/todo-txt/gtd-plugin-todo-txt.h             |    3 +-
 plugins/todo-txt/gtd-provider-todo-txt.c           |    2 +-
 plugins/todo-txt/gtd-provider-todo-txt.h           |    4 +-
 plugins/todo-txt/gtd-todo-txt-parser.c             |    5 +-
 plugins/todo-txt/gtd-todo-txt-parser.h             |    3 +-
 plugins/todoist/gtd-plugin-todoist.h               |    3 +-
 plugins/todoist/gtd-provider-todoist.c             |    1 +
 plugins/todoist/gtd-provider-todoist.h             |    3 +-
 plugins/todoist/gtd-todoist-preferences-panel.c    |    1 +
 plugins/todoist/gtd-todoist-preferences-panel.h    |    3 +-
 src/gnome-todo.h                                   |   10 +-
 src/main.c                                         |    9 +-
 src/meson.build                                    |  122 +++++++++----------
 26 files changed, 117 insertions(+), 110 deletions(-)
---
diff --git a/meson.build b/meson.build
index c2e6c18..58d41b7 100644
--- a/meson.build
+++ b/meson.build
@@ -1,12 +1,10 @@
 project(
-  'gnome-todo', 'c',
-  version: '3.26.0',
-  license: 'GPL3+',
-  default_options: [
-    'buildtype=debugoptimized',
-    'warning_level=1'
-  ],
-  meson_version: '>= 0.41.0'
+     'gnome-todo',
+              'c',
+          version: '3.26.0',
+          license: 'GPL3+',
+  default_options: [ 'buildtype=debugoptimized', 'warning_level=1' ],
+    meson_version: '>= 0.41.0'
 )
 
 gnome_todo_version = meson.project_version()
@@ -175,7 +173,7 @@ i18n = import('i18n')
 pkg = import('pkgconfig')
 
 top_inc = include_directories('.')
-src_inc = include_directories('src')
+src_inc = include_directories('src', 'src/engine', 'src/interfaces', 'src/notification')
 
 data_dir = join_paths(meson.source_root(), 'data')
 po_dir = join_paths(meson.source_root(), 'po')
diff --git a/plugins/background/gtd-plugin-background.h b/plugins/background/gtd-plugin-background.h
index 30402af..40b292d 100644
--- a/plugins/background/gtd-plugin-background.h
+++ b/plugins/background/gtd-plugin-background.h
@@ -19,8 +19,9 @@
 #ifndef GTD_PLUGIN_BACKGROUND_H
 #define GTD_PLUGIN_BACKGROUND_H
 
+#include "gnome-todo.h"
+
 #include <glib.h>
-#include <gnome-todo.h>
 
 G_BEGIN_DECLS
 
diff --git a/plugins/background/meson.build b/plugins/background/meson.build
index 599c2cb..b497eb1 100644
--- a/plugins/background/meson.build
+++ b/plugins/background/meson.build
@@ -3,11 +3,11 @@ plugin_name = 'background'
 plugins_ldflags += ['-Wl,--undefined=gtd_plugin_background_register_types']
 
 plugins_libs += static_library(
-  plugin_name,
-  sources: 'gtd-plugin-' + plugin_name + '.c',
+          plugin_name,
+              sources: 'gtd-plugin-' + plugin_name + '.c',
   include_directories: plugins_incs,
-  dependencies: gnome_todo_deps,
-  c_args: '-DPACKAGE_DATA_DIR="@0@"'.format(gnome_todo_pkgdatadir)
+         dependencies: gnome_todo_deps,
+               c_args: '-DPACKAGE_DATA_DIR="@0@"'.format(gnome_todo_pkgdatadir),
 )
 
 install_data(
@@ -18,7 +18,7 @@ install_data(
 plugin_data = plugin_name + '.plugin'
 
 plugins_confs += configure_file(
-  input: plugin_data + '.in',
-  output: plugin_data,
+          input: plugin_data + '.in',
+         output: plugin_data,
   configuration: plugins_conf
 )
diff --git a/plugins/dark-theme/gtd-plugin-dark-theme.h b/plugins/dark-theme/gtd-plugin-dark-theme.h
index bba00ca..64b55a4 100644
--- a/plugins/dark-theme/gtd-plugin-dark-theme.h
+++ b/plugins/dark-theme/gtd-plugin-dark-theme.h
@@ -19,8 +19,9 @@
 #ifndef GTD_PLUGIN_DARK_THEME_H
 #define GTD_PLUGIN_DARK_THEME_H
 
+#include "gnome-todo.h"
+
 #include <glib.h>
-#include <gnome-todo.h>
 
 G_BEGIN_DECLS
 
diff --git a/plugins/eds/gtd-plugin-eds.h b/plugins/eds/gtd-plugin-eds.h
index 66984e7..824ba6d 100644
--- a/plugins/eds/gtd-plugin-eds.h
+++ b/plugins/eds/gtd-plugin-eds.h
@@ -19,8 +19,9 @@
 #ifndef GTD_EDS_PLUGIN_H
 #define GTD_EDS_PLUGIN_H
 
+#include "gnome-todo.h"
+
 #include <glib.h>
-#include <gnome-todo.h>
 
 G_BEGIN_DECLS
 
diff --git a/plugins/eds/gtd-provider-eds.h b/plugins/eds/gtd-provider-eds.h
index 59c9b82..a5c3f78 100644
--- a/plugins/eds/gtd-provider-eds.h
+++ b/plugins/eds/gtd-provider-eds.h
@@ -19,8 +19,9 @@
 #ifndef GTD_PROVIDER_EDS_H
 #define GTD_PROVIDER_EDS_H
 
+#include "gnome-todo.h"
+
 #include <glib.h>
-#include <gnome-todo.h>
 #include <libecal/libecal.h>
 #include <libedataserverui/libedataserverui.h>
 
diff --git a/plugins/eds/gtd-provider-goa.h b/plugins/eds/gtd-provider-goa.h
index 8906d24..6f9632a 100644
--- a/plugins/eds/gtd-provider-goa.h
+++ b/plugins/eds/gtd-provider-goa.h
@@ -21,10 +21,10 @@
 
 #define GOA_API_IS_SUBJECT_TO_CHANGE 1
 
+#include "gnome-todo.h"
 #include "gtd-provider-eds.h"
 
 #include <glib.h>
-#include <gnome-todo.h>
 #include <goa/goa.h>
 
 G_BEGIN_DECLS
diff --git a/plugins/eds/gtd-provider-local.h b/plugins/eds/gtd-provider-local.h
index 8d77bf6..7cba50c 100644
--- a/plugins/eds/gtd-provider-local.h
+++ b/plugins/eds/gtd-provider-local.h
@@ -19,11 +19,11 @@
 #ifndef GTD_PROVIDER_LOCAL_H
 #define GTD_PROVIDER_LOCAL_H
 
+#include "gnome-todo.h"
 #include "gtd-provider-eds.h"
 
 #include <glib.h>
 
-#include <gnome-todo.h>
 #include <libecal/libecal.h>
 #include <libedataserverui/libedataserverui.h>
 
diff --git a/plugins/eds/gtd-task-list-eds.h b/plugins/eds/gtd-task-list-eds.h
index aa3f7b1..bf4dbee 100644
--- a/plugins/eds/gtd-task-list-eds.h
+++ b/plugins/eds/gtd-task-list-eds.h
@@ -19,8 +19,9 @@
 #ifndef GTD_TASK_LIST_EDS_H
 #define GTD_TASK_LIST_EDS_H
 
+#include "gnome-todo.h"
+
 #include <glib-object.h>
-#include <gnome-todo.h>
 #include <libecal/libecal.h>
 
 G_BEGIN_DECLS
diff --git a/plugins/scheduled-panel/gtd-panel-scheduled.c b/plugins/scheduled-panel/gtd-panel-scheduled.c
index ec7fa6d..3f07f64 100644
--- a/plugins/scheduled-panel/gtd-panel-scheduled.c
+++ b/plugins/scheduled-panel/gtd-panel-scheduled.c
@@ -16,10 +16,11 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "gnome-todo.h"
+
 #include "gtd-panel-scheduled.h"
 
 #include <glib/gi18n.h>
-#include <gnome-todo.h>
 #include <math.h>
 
 struct _GtdPanelScheduled
diff --git a/plugins/scheduled-panel/gtd-plugin-scheduled-panel.h 
b/plugins/scheduled-panel/gtd-plugin-scheduled-panel.h
index 5f85ec5..74281af 100644
--- a/plugins/scheduled-panel/gtd-plugin-scheduled-panel.h
+++ b/plugins/scheduled-panel/gtd-plugin-scheduled-panel.h
@@ -19,8 +19,9 @@
 #ifndef GTD_PLUGIN_SCHEDULED_PANEL_H
 #define GTD_PLUGIN_SCHEDULED_PANEL_H
 
+#include "gnome-todo.h"
+
 #include <glib.h>
-#include <gnome-todo.h>
 
 G_BEGIN_DECLS
 
diff --git a/plugins/today-panel/gtd-panel-today.c b/plugins/today-panel/gtd-panel-today.c
index c3c62b4..86d5f06 100644
--- a/plugins/today-panel/gtd-panel-today.c
+++ b/plugins/today-panel/gtd-panel-today.c
@@ -16,10 +16,10 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "gnome-todo.h"
 #include "gtd-panel-today.h"
 
 #include <glib/gi18n.h>
-#include <gnome-todo.h>
 
 struct _GtdPanelToday
 {
diff --git a/plugins/today-panel/gtd-plugin-today-panel.h b/plugins/today-panel/gtd-plugin-today-panel.h
index a30c6b8..0f61041 100644
--- a/plugins/today-panel/gtd-plugin-today-panel.h
+++ b/plugins/today-panel/gtd-plugin-today-panel.h
@@ -19,8 +19,9 @@
 #ifndef GTD_PLUGIN_TODAY_PANEL_H
 #define GTD_PLUGIN_TODAY_PANEL_H
 
+#include "gnome-todo.h"
+
 #include <glib.h>
-#include <gnome-todo.h>
 
 G_BEGIN_DECLS
 
diff --git a/plugins/todo-txt/gtd-plugin-todo-txt.h b/plugins/todo-txt/gtd-plugin-todo-txt.h
index e4e4bbf..cc3eb12 100644
--- a/plugins/todo-txt/gtd-plugin-todo-txt.h
+++ b/plugins/todo-txt/gtd-plugin-todo-txt.h
@@ -19,8 +19,9 @@
 #ifndef GTD_TODO_TXT_PLUGIN_H
 #define GTD_TODO_TXT_PLUGIN_H
 
+#include "gnome-todo.h"
+
 #include <glib.h>
-#include <gnome-todo.h>
 
 G_BEGIN_DECLS
 
diff --git a/plugins/todo-txt/gtd-provider-todo-txt.c b/plugins/todo-txt/gtd-provider-todo-txt.c
index 61d7bc1..50421d9 100644
--- a/plugins/todo-txt/gtd-provider-todo-txt.c
+++ b/plugins/todo-txt/gtd-provider-todo-txt.c
@@ -19,9 +19,9 @@
 #include "gtd-provider-todo-txt.h"
 #include "gtd-plugin-todo-txt.h"
 #include "gtd-todo-txt-parser.h"
+
 #include <string.h>
 #include <stdlib.h>
-
 #include <glib/gi18n.h>
 
 
diff --git a/plugins/todo-txt/gtd-provider-todo-txt.h b/plugins/todo-txt/gtd-provider-todo-txt.h
index 7d85b4f..53c19b7 100644
--- a/plugins/todo-txt/gtd-provider-todo-txt.h
+++ b/plugins/todo-txt/gtd-provider-todo-txt.h
@@ -19,9 +19,9 @@
 #ifndef GTD_PROVIDER_TODO_TXT_H
 #define GTD_PROVIDER_TODO_TXT_H
 
-#include <glib.h>
+#include "gnome-todo.h"
 
-#include <gnome-todo.h>
+#include <glib.h>
 
 G_BEGIN_DECLS
 
diff --git a/plugins/todo-txt/gtd-todo-txt-parser.c b/plugins/todo-txt/gtd-todo-txt-parser.c
index e9cc12a..0e03458 100644
--- a/plugins/todo-txt/gtd-todo-txt-parser.c
+++ b/plugins/todo-txt/gtd-todo-txt-parser.c
@@ -16,9 +16,10 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "gtd-todo-txt-parser.h"
+#include "gtd-provider-todo-txt.h"
+
 #include <glib/gi18n.h>
-#include <gtd-todo-txt-parser.h>
-#include <gtd-provider-todo-txt.h>
 
 struct _GtdTodoTxtParser
 {
diff --git a/plugins/todo-txt/gtd-todo-txt-parser.h b/plugins/todo-txt/gtd-todo-txt-parser.h
index ff6fe1a..8d3b567 100644
--- a/plugins/todo-txt/gtd-todo-txt-parser.h
+++ b/plugins/todo-txt/gtd-todo-txt-parser.h
@@ -19,8 +19,9 @@
 #ifndef GTD_TODO_TXT_PARSE_H
 #define GTD_TODO_TXT_PARSE_H
 
+#include "gnome-todo.h"
+
 #include <glib.h>
-#include <gnome-todo.h>
 
 G_BEGIN_DECLS
 
diff --git a/plugins/todoist/gtd-plugin-todoist.h b/plugins/todoist/gtd-plugin-todoist.h
index e2eac39..3706063 100644
--- a/plugins/todoist/gtd-plugin-todoist.h
+++ b/plugins/todoist/gtd-plugin-todoist.h
@@ -19,8 +19,9 @@
 #ifndef GTD_TODOIST_PLUGIN_H
 #define GTD_TODOIST_PLUGIN_H
 
+#include "gnome-todo.h"
+
 #include <glib.h>
-#include <gnome-todo.h>
 
 G_BEGIN_DECLS
 
diff --git a/plugins/todoist/gtd-provider-todoist.c b/plugins/todoist/gtd-provider-todoist.c
index 8e3958f..d55ff27 100644
--- a/plugins/todoist/gtd-provider-todoist.c
+++ b/plugins/todoist/gtd-provider-todoist.c
@@ -20,6 +20,7 @@
 
 #include "gtd-provider-todoist.h"
 #include "gtd-plugin-todoist.h"
+
 #include <rest/oauth2-proxy.h>
 #include <json-glib/json-glib.h>
 #include <string.h>
diff --git a/plugins/todoist/gtd-provider-todoist.h b/plugins/todoist/gtd-provider-todoist.h
index b2d2f06..8cb3a76 100644
--- a/plugins/todoist/gtd-provider-todoist.h
+++ b/plugins/todoist/gtd-provider-todoist.h
@@ -21,8 +21,9 @@
 
 #define GOA_API_IS_SUBJECT_TO_CHANGE
 
+#include "gnome-todo.h"
+
 #include <glib.h>
-#include <gnome-todo.h>
 #include <goa/goa.h>
 
 G_BEGIN_DECLS
diff --git a/plugins/todoist/gtd-todoist-preferences-panel.c b/plugins/todoist/gtd-todoist-preferences-panel.c
index 31ba86c..c6fecbe 100644
--- a/plugins/todoist/gtd-todoist-preferences-panel.c
+++ b/plugins/todoist/gtd-todoist-preferences-panel.c
@@ -17,6 +17,7 @@
  */
 
 #include "gtd-todoist-preferences-panel.h"
+
 #include <glib/gi18n.h>
 
 struct _GtdTodoistPreferencesPanel
diff --git a/plugins/todoist/gtd-todoist-preferences-panel.h b/plugins/todoist/gtd-todoist-preferences-panel.h
index 9b14f9a..133e40f 100644
--- a/plugins/todoist/gtd-todoist-preferences-panel.h
+++ b/plugins/todoist/gtd-todoist-preferences-panel.h
@@ -21,8 +21,9 @@
 #ifndef GTD_TODOIST_PREFERENCES_PANEL_H
 #define GTD_TODOIST_PREFERENCES_PANEL_H
 
+#include "gnome-todo.h"
+
 #include <glib.h>
-#include <gnome-todo.h>
 #include <goa/goa.h>
 
 G_BEGIN_DECLS
diff --git a/src/gnome-todo.h b/src/gnome-todo.h
index 09fdf8e..6deb707 100644
--- a/src/gnome-todo.h
+++ b/src/gnome-todo.h
@@ -19,13 +19,13 @@
 #ifndef GNOME_TODO_H
 #define GNOME_TODO_H
 
-#include "engine/gtd-manager.h"
-#include "interfaces/gtd-activatable.h"
-#include "interfaces/gtd-panel.h"
-#include "interfaces/gtd-provider.h"
-#include "notification/gtd-notification.h"
+#include "gtd-activatable.h"
 #include "gtd-enums.h"
+#include "gtd-manager.h"
+#include "gtd-notification.h"
 #include "gtd-object.h"
+#include "gtd-panel.h"
+#include "gtd-provider.h"
 #include "gtd-task.h"
 #include "gtd-task-list.h"
 #include "gtd-task-list-view.h"
diff --git a/src/main.c b/src/main.c
index 2d31584..f926328 100644
--- a/src/main.c
+++ b/src/main.c
@@ -17,13 +17,12 @@
  * with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
 #include "gtd-application.h"
 
-int
-main (int argc,
+#include <config.h>
+
+gint
+main (gint  argc,
       char *argv[])
 {
   GtdApplication *app;
diff --git a/src/meson.build b/src/meson.build
index 179c508..8f1684a 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,27 +1,12 @@
-install_headers(
-  'engine/gtd-manager.h',
-  subdir: join_paths(meson.project_name(), 'engine')
-)
-
-interfaces_headers = files(
-  'interfaces/gtd-activatable.h',
-  'interfaces/gtd-panel.h',
-  'interfaces/gtd-provider.h'
-)
-
-install_headers(
-  interfaces_headers,
-  subdir: join_paths(meson.project_name(), 'interfaces')
-)
-
-install_headers(
-  'notification/gtd-notification.h',
-  subdir: join_paths(meson.project_name(), 'notification')
-)
 
 enum_headers = files('gtd-enums.h')
 
 headers = enum_headers + files(
+  'engine/gtd-manager.h',
+  'interfaces/gtd-activatable.h',
+  'interfaces/gtd-panel.h',
+  'interfaces/gtd-provider.h',
+  'notification/gtd-notification.h',
   'gtd-object.h',
   'gtd-task.h',
   'gtd-task-list.h',
@@ -32,10 +17,12 @@ headers = enum_headers + files(
   'gnome-todo.h'
 )
 
-install_headers(
-  headers,
-  subdir: meson.project_name()
-)
+install_headers(headers, subdir: meson.project_name())
+
+
+################
+# Source files #
+################
 
 sources = files(
   'engine/gtd-manager.c',
@@ -77,20 +64,17 @@ sources = files(
 sources += gnome.compile_resources(
   'gtd-resources',
   join_paths(data_dir, 'todo.gresource.xml'),
-  source_dir: [
-    data_dir,
-    join_paths(meson.build_root(), 'plugins')
-  ],
-  c_name: 'todo',
+    source_dir: [ data_dir, join_paths(meson.build_root(), 'plugins') ],
+        c_name: 'todo',
   dependencies: plugins_confs,
-  export: true
+        export: true
 )
 
 enum = 'gtd-enum-types'
 
 sources += gnome.mkenums(
-  enum,
-  sources: enum_headers,
+        enum,
+     sources: enum_headers,
   c_template: enum + '.c.template',
   h_template: enum + '.h.template'
 )
@@ -126,43 +110,53 @@ endif
 
 gnome_todo = executable(
   meson.project_name(),
-  sources,
+               sources,
   include_directories: incs,
-  dependencies: gnome_todo_deps,
-  c_args: cflags,
-  link_with: plugins_libs,
-  link_args: ldflags,
-  install: true,
-  install_dir: gnome_todo_bindir
+         dependencies: gnome_todo_deps,
+               c_args: cflags,
+            link_with: plugins_libs,
+            link_args: ldflags,
+              install: true,
+          install_dir: gnome_todo_bindir
 )
 
 libgtd = shared_library(
-  'gtd',
-  sources: sources,
-  version: libversion,
-  soversion: soversion,
+                'gtd',
+              sources: sources,
+              version: libversion,
+            soversion: soversion,
   include_directories: incs,
-  dependencies: gnome_todo_deps,
-  c_args: cflags
+         dependencies: gnome_todo_deps,
+               c_args: cflags
 )
 
 libgtd_dep = declare_dependency(
-  link_with: libgtd,
+            link_with: libgtd,
   include_directories: src_inc,
-  dependencies: gnome_todo_deps
+         dependencies: gnome_todo_deps
 )
 
+
+##############
+# pkg-config #
+##############
+
 pkg.generate(
-  libraries: libgtd,
-  version: gnome_todo_version,
-  name: 'Gnome To Do',
+    libraries: libgtd,
+      version: gnome_todo_version,
+         name: 'Gnome To Do',
   description: 'Header and path for Gnome Todo Plugins',
-  filebase: meson.project_name(),
-  subdirs: meson.project_name(),
-  variables: 'exec_prefix=' + gnome_todo_libexecdir,
+     filebase: meson.project_name(),
+      subdirs: meson.project_name(),
+    variables: 'exec_prefix=' + gnome_todo_libexecdir,
   install_dir: join_paths(gnome_todo_libdir, 'pkgconfig')
 )
 
+
+#########################
+# GObject-Introspection #
+#########################
+
 if get_option('enable-introspection')
   gir_sources = files(
     'engine/gtd-manager.c',
@@ -203,17 +197,17 @@ if get_option('enable-introspection')
   typelib_dir = join_paths(gnome_todo_libdir, '@0@-@1@'.format('girepository', gnome_todo_gir_version))
 
   gnome.generate_gir(
-    gnome_todo,
-    sources: gir_sources,
-    namespace: gnome_todo_gir_namespace,
-    nsversion: gnome_todo_gir_version,
-    identifier_prefix: gnome_todo_gir_namespace,
-    symbol_prefix: gnome_todo_gir_namespace.to_lower(),
-    includes: gir_incs,
+             gnome_todo,
+                sources: gir_sources,
+              namespace: gnome_todo_gir_namespace,
+              nsversion: gnome_todo_gir_version,
+      identifier_prefix: gnome_todo_gir_namespace,
+          symbol_prefix: gnome_todo_gir_namespace.to_lower(),
+               includes: gir_incs,
     include_directories: incs,
-    extra_args: gir_extra_args,
-    install: true,
-    install_dir_gir: gir_dir,
-    install_dir_typelib: typelib_dir
+             extra_args: gir_extra_args,
+                install: true,
+        install_dir_gir: gir_dir,
+    install_dir_typelib: typelib_dir,
   )
 endif


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