[libdazzle] Split off Meson build files for sub-directories



commit b3b7c6f75cc2ed29a997117a5ec84c7a59132d36
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue May 30 12:21:25 2017 +0100

    Split off Meson build files for sub-directories
    
    We start with the headers.

 meson.build                  |    1 +
 src/actions/meson.build      |   10 ++
 src/animation/meson.build    |    8 ++
 src/app/meson.build          |    8 ++
 src/bindings/meson.build     |    8 ++
 src/cache/meson.build        |    7 ++
 src/files/meson.build        |    8 ++
 src/graphing/meson.build     |   14 +++
 src/menus/meson.build        |   11 +++
 src/meson.build              |  187 +++++-------------------------------------
 src/panel/meson.build        |   22 +++++
 src/search/meson.build       |   15 ++++
 src/settings/meson.build     |    7 ++
 src/shortcuts/meson.build    |   19 ++++
 src/statemachine/meson.build |   10 ++
 src/suggestions/meson.build  |   13 +++
 src/theming/meson.build      |    8 ++
 src/tree/meson.build         |   10 ++
 src/util/meson.build         |   14 +++
 src/widgets/meson.build      |   32 +++++++
 20 files changed, 245 insertions(+), 167 deletions(-)
---
diff --git a/meson.build b/meson.build
index 6d52ad2..09454eb 100644
--- a/meson.build
+++ b/meson.build
@@ -38,6 +38,7 @@ configure_file(
 add_project_arguments([
   '-DHAVE_CONFIG_H',
   '-DDAZZLE_COMPILATION',
+  '-I' + meson.build_root(),
 ], language: 'c')
 
 root_inc = include_directories('.')
diff --git a/src/actions/meson.build b/src/actions/meson.build
new file mode 100644
index 0000000..f1a6dbf
--- /dev/null
+++ b/src/actions/meson.build
@@ -0,0 +1,10 @@
+action_headers = [
+  'dzl-child-property-action.h',
+  'dzl-properties-group.h',
+  'dzl-settings-flag-action.h',
+  'dzl-widget-action-group.h',
+]
+
+libdazzle_public_headers += files(action_headers)
+
+install_headers(action_headers, subdir: join_paths(libdazzle_header_subdir, 'actions'))
diff --git a/src/animation/meson.build b/src/animation/meson.build
new file mode 100644
index 0000000..a704d7e
--- /dev/null
+++ b/src/animation/meson.build
@@ -0,0 +1,8 @@
+animation_headers = [
+  'dzl-animation.h',
+  'dzl-box-theatric.h',
+]
+
+libdazzle_public_headers += files(animation_headers)
+
+install_headers(animation_headers, subdir: join_paths(libdazzle_header_subdir, 'animation'))
diff --git a/src/app/meson.build b/src/app/meson.build
new file mode 100644
index 0000000..fd6ec63
--- /dev/null
+++ b/src/app/meson.build
@@ -0,0 +1,8 @@
+app_headers = [
+  'dzl-application.h',
+  'dzl-application-window.h',
+]
+
+libdazzle_public_headers += files(app_headers)
+
+install_headers(app_headers, subdir: join_paths(libdazzle_header_subdir, 'app'))
diff --git a/src/bindings/meson.build b/src/bindings/meson.build
new file mode 100644
index 0000000..37917fd
--- /dev/null
+++ b/src/bindings/meson.build
@@ -0,0 +1,8 @@
+bindings_headers = [
+  'dzl-binding-group.h',
+  'dzl-signal-group.h',
+]
+
+libdazzle_public_headers += files(bindings_headers)
+
+install_headers(bindings_headers, subdir: join_paths(libdazzle_header_subdir, 'bindings'))
diff --git a/src/cache/meson.build b/src/cache/meson.build
new file mode 100644
index 0000000..ee63656
--- /dev/null
+++ b/src/cache/meson.build
@@ -0,0 +1,7 @@
+cache_headers = [
+  'dzl-task-cache.h',
+]
+
+libdazzle_public_headers += files(cache_headers)
+
+install_headers(cache_headers, subdir: join_paths(libdazzle_header_subdir, 'cache'))
diff --git a/src/files/meson.build b/src/files/meson.build
new file mode 100644
index 0000000..1953caf
--- /dev/null
+++ b/src/files/meson.build
@@ -0,0 +1,8 @@
+files_headers = [
+  'dzl-directory-model.h',
+  'dzl-directory-reaper.h',
+]
+
+libdazzle_public_headers += files(files_headers)
+
+install_headers(files_headers, subdir: join_paths(libdazzle_header_subdir, 'files'))
diff --git a/src/graphing/meson.build b/src/graphing/meson.build
new file mode 100644
index 0000000..08e6003
--- /dev/null
+++ b/src/graphing/meson.build
@@ -0,0 +1,14 @@
+graphing_headers = [
+  'dzl-cpu-graph.h',
+  'dzl-cpu-model.h',
+  'dzl-graph-column.h',
+  'dzl-graph-column-private.h',
+  'dzl-graph-line-renderer.h',
+  'dzl-graph-model.h',
+  'dzl-graph-renderer.h',
+  'dzl-graph-view.h',
+]
+
+libdazzle_public_headers += files(graphing_headers)
+
+install_headers(graphing_headers, subdir: join_paths(libdazzle_header_subdir, 'graphing'))
diff --git a/src/menus/meson.build b/src/menus/meson.build
new file mode 100644
index 0000000..5f40852
--- /dev/null
+++ b/src/menus/meson.build
@@ -0,0 +1,11 @@
+menus_headers = [
+  'dzl-joined-menu.h',
+  'dzl-menu-button-item.h',
+  'dzl-menu-button-section.h',
+  'dzl-menu-button.h',
+  'dzl-menu-manager.h',
+]
+
+libdazzle_public_headers += files(menus_headers)
+
+install_headers(menus_headers, subdir: join_paths(libdazzle_header_subdir, 'menus'))
diff --git a/src/meson.build b/src/meson.build
index 8d691b3..271e90d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -41,156 +41,27 @@ non_introspectable_public_headers = [
 
 libdazzle_public_headers = [
   'dazzle.h',
-
-  'actions/dzl-child-property-action.h',
-  'actions/dzl-properties-group.h',
-  'actions/dzl-settings-flag-action.h',
-  'actions/dzl-widget-action-group.h',
-
-  'animation/dzl-animation.h',
-  'animation/dzl-box-theatric.h',
-
-  'app/dzl-application.h',
-  'app/dzl-application-window.h',
-
-  'bindings/dzl-binding-group.h',
-  'bindings/dzl-signal-group.h',
-
-  'cache/dzl-task-cache.h',
-
-  'files/dzl-directory-model.h',
-  'files/dzl-directory-reaper.h',
-
-  'graphing/dzl-cpu-graph.h',
-  'graphing/dzl-cpu-model.h',
-  'graphing/dzl-graph-column.h',
-  'graphing/dzl-graph-line-renderer.h',
-  'graphing/dzl-graph-model.h',
-  'graphing/dzl-graph-renderer.h',
-  'graphing/dzl-graph-view.h',
-
-  'menus/dzl-joined-menu.h',
-  'menus/dzl-menu-button.h',
-  'menus/dzl-menu-button-item.h',
-  'menus/dzl-menu-button-section.h',
-  'menus/dzl-menu-manager.h',
-
-  'panel/dzl-dock-bin-edge.h',
-  'panel/dzl-dock-bin.h',
-  'panel/dzl-dock-item.h',
-  'panel/dzl-dock-manager.h',
-  'panel/dzl-dock-overlay-edge.h',
-  'panel/dzl-dock-overlay.h',
-  'panel/dzl-dock-paned.h',
-  'panel/dzl-dock-revealer.h',
-  'panel/dzl-dock-stack.h',
-  'panel/dzl-dock-transient-grab.h',
-  'panel/dzl-dock-types.h',
-  'panel/dzl-dock-widget.h',
-  'panel/dzl-dock-window.h',
-  'panel/dzl-dock.h',
-  'panel/dzl-tab-strip.h',
-  'panel/dzl-tab.h',
-
-  'pathbar/dzl-path.h',
-  'pathbar/dzl-path-bar.h',
-  'pathbar/dzl-path-element.h',
-
-  'prefs/dzl-preferences-bin.h',
-  'prefs/dzl-preferences-entry.h',
-  'prefs/dzl-preferences-file-chooser-button.h',
-  'prefs/dzl-preferences-flow-box.h',
-  'prefs/dzl-preferences-font-button.h',
-  'prefs/dzl-preferences-group.h',
-  'prefs/dzl-preferences-page.h',
-  'prefs/dzl-preferences-spin-button.h',
-  'prefs/dzl-preferences-switch.h',
-  'prefs/dzl-preferences-view.h',
-  'prefs/dzl-preferences.h',
-
-  'search/dzl-fuzzy-index-builder.h',
-  'search/dzl-fuzzy-index-cursor.h',
-  'search/dzl-fuzzy-index-match.h',
-  'search/dzl-fuzzy-index.h',
-  'search/dzl-fuzzy-mutable-index.h',
-  'search/dzl-levenshtein.h',
-  'search/dzl-pattern-spec.h',
-  'search/dzl-trie.h',
-
-  'settings/dzl-settings-sandwich.h',
-
-  'shortcuts/dzl-shortcut-accel-dialog.h',
-  'shortcuts/dzl-shortcut-chord.h',
-  'shortcuts/dzl-shortcut-context.h',
-  'shortcuts/dzl-shortcut-controller.h',
-  'shortcuts/dzl-shortcut-label.h',
-  'shortcuts/dzl-shortcut-manager.h',
-  'shortcuts/dzl-shortcut-model.h',
-  'shortcuts/dzl-shortcut-theme-editor.h',
-  'shortcuts/dzl-shortcut-theme.h',
-  'shortcuts/dzl-shortcuts-group.h',
-  'shortcuts/dzl-shortcuts-section.h',
-  'shortcuts/dzl-shortcuts-shortcut.h',
-  'shortcuts/dzl-shortcuts-window.h',
-
-  'statemachine/dzl-state-machine-buildable.h',
-  'statemachine/dzl-state-machine.h',
-
-  'suggestions/dzl-suggestion-entry-buffer.h',
-  'suggestions/dzl-suggestion-entry.h',
-  'suggestions/dzl-suggestion-popover.h',
-  'suggestions/dzl-suggestion-row.h',
-  'suggestions/dzl-suggestion.h',
-
-  'theming/dzl-css-provider.h',
-  'theming/dzl-theme-manager.h',
-
-  'tree/dzl-tree-builder.h',
-  'tree/dzl-tree-node.h',
-  'tree/dzl-tree-types.h',
-  'tree/dzl-tree.h',
-
-  'util/dzl-cairo.h',
-  'util/dzl-counter.h',
-  'util/dzl-date-time.h',
-  'util/dzl-dnd.h',
-  'util/dzl-file-manager.h',
-  'util/dzl-gdk.h',
-  'util/dzl-gtk.h',
-  'util/dzl-heap.h',
-  'util/dzl-pango.h',
-  'util/dzl-rgba.h',
-  'util/dzl-ring.h',
-  'util/dzl-variant.h',
-
-  'widgets/dzl-bin.h',
-  'widgets/dzl-bolding-label.h',
-  'widgets/dzl-box.h',
-  'widgets/dzl-centering-bin.h',
-  'widgets/dzl-column-layout.h',
-  'widgets/dzl-counters-window.h',
-  'widgets/dzl-elastic-bin.h',
-  'widgets/dzl-empty-state.h',
-  'widgets/dzl-entry-box.h',
-  'widgets/dzl-file-chooser-entry.h',
-  'widgets/dzl-list-box.h',
-  'widgets/dzl-list-box-row.h',
-  'widgets/dzl-multi-paned.h',
-  'widgets/dzl-pill-box.h',
-  'widgets/dzl-priority-box.h',
-  'widgets/dzl-progress-button.h',
-  'widgets/dzl-progress-menu-button.h',
-  'widgets/dzl-progress-icon.h',
-  'widgets/dzl-radio-box.h',
-  'widgets/dzl-scrolled-window.h',
-  'widgets/dzl-search-bar.h',
-  'widgets/dzl-simple-label.h',
-  'widgets/dzl-simple-popover.h',
-  'widgets/dzl-slider.h',
-  'widgets/dzl-stack-list.h',
-  'widgets/dzl-three-grid.h',
 ]
 
+subdir('actions')
+subdir('animation')
+subdir('app')
+subdir('bindings')
+subdir('cache')
+subdir('files')
+subdir('graphing')
+subdir('menus')
+subdir('panel')
+subdir('search')
+subdir('settings')
+subdir('shortcuts')
+subdir('statemachine')
+subdir('suggestions')
+subdir('theming')
+subdir('tree')
+subdir('util')
+subdir('widgets')
+
 libdazzle_public_sources = [
   'actions/dzl-child-property-action.c',
   'actions/dzl-properties-group.c',
@@ -345,11 +216,9 @@ libdazzle_public_sources = [
 libdazzle_sources = [
   non_introspectable_public_headers,
   libdazzle_generated_headers,
-  libdazzle_public_headers,
   libdazzle_public_sources,
 
   'animation/dzl-frame-source.c',
-  'animation/dzl-frame-source.h',
 
   'graphing/dzl-graph-column-private.h',
 
@@ -364,10 +233,6 @@ libdazzle_sources = [
   'search/dzl-fuzzy-index-private.h',
 
   'shortcuts/dzl-shortcut-closure-chain.c',
-  'shortcuts/dzl-shortcut-closure-chain.h',
-  'shortcuts/dzl-shortcut-private.h',
-  'shortcuts/dzl-shortcuts-shortcut-private.h',
-  'shortcuts/dzl-shortcuts-window-private.h',
 
   'tree/dzl-tree-private.h',
 
@@ -375,7 +240,6 @@ libdazzle_sources = [
 
   'widgets/dzl-list-box-private.h',
   'widgets/dzl-rect-helper.c',
-  'widgets/dzl-rect-helper.h',
 
   libdazzle_resources,
 ]
@@ -396,7 +260,7 @@ endif
 libdazzle_map = join_paths(meson.current_source_dir(), 'dazzle.map')
 
 libdazzle = shared_library(
-  'dazzle-' + libdazzle_api_version,
+  'dazzle-' + apiversion,
   libdazzle_sources,
 
          link_depends: libdazzle_map,
@@ -443,17 +307,6 @@ if get_option('with_introspection')
   endif
 endif
 
-# TODO: This is ugly and should be handled upstream
-foreach header: libdazzle_public_headers + non_introspectable_public_headers
-  header_split = header.split('/')
-  if header_split.length() == 2
-    header_path = join_paths(libdazzle_header_subdir, header_split[0])
-    install_headers(header, subdir: header_path)
-  else
-    install_headers(header, subdir: libdazzle_header_subdir)
-  endif
-endforeach
-
 pkgg = import('pkgconfig')
 
 pkgg.generate(
diff --git a/src/panel/meson.build b/src/panel/meson.build
new file mode 100644
index 0000000..0645c2b
--- /dev/null
+++ b/src/panel/meson.build
@@ -0,0 +1,22 @@
+panel_headers = [
+  'dzl-dock-bin-edge.h',
+  'dzl-dock-bin.h',
+  'dzl-dock-item.h',
+  'dzl-dock-manager.h',
+  'dzl-dock-overlay-edge.h',
+  'dzl-dock-overlay.h',
+  'dzl-dock-paned.h',
+  'dzl-dock-revealer.h',
+  'dzl-dock-stack.h',
+  'dzl-dock-transient-grab.h',
+  'dzl-dock-types.h',
+  'dzl-dock-widget.h',
+  'dzl-dock-window.h',
+  'dzl-dock.h',
+  'dzl-tab-strip.h',
+  'dzl-tab.h',
+]
+
+libdazzle_public_headers += files(panel_headers)
+
+install_headers(panel_headers, subdir: join_paths(libdazzle_header_subdir, 'panel'))
diff --git a/src/search/meson.build b/src/search/meson.build
new file mode 100644
index 0000000..f27ddb4
--- /dev/null
+++ b/src/search/meson.build
@@ -0,0 +1,15 @@
+search_headers = [
+  'dzl-fuzzy-index-builder.h',
+  'dzl-fuzzy-index-cursor.h',
+  'dzl-fuzzy-index.h',
+  'dzl-fuzzy-index-match.h',
+  'dzl-fuzzy-index-private.h',
+  'dzl-fuzzy-mutable-index.h',
+  'dzl-levenshtein.h',
+  'dzl-pattern-spec.h',
+  'dzl-trie.h',
+]
+
+libdazzle_public_headers += files(search_headers)
+
+install_headers(search_headers, subdir: join_paths(libdazzle_header_subdir, 'search'))
diff --git a/src/settings/meson.build b/src/settings/meson.build
new file mode 100644
index 0000000..c0f8246
--- /dev/null
+++ b/src/settings/meson.build
@@ -0,0 +1,7 @@
+settings_headers = [
+  'dzl-settings-sandwich.h',
+]
+
+libdazzle_public_headers += files(settings_headers)
+
+install_headers(settings_headers, subdir: join_paths(libdazzle_header_subdir, 'settings'))
diff --git a/src/shortcuts/meson.build b/src/shortcuts/meson.build
new file mode 100644
index 0000000..860d0bd
--- /dev/null
+++ b/src/shortcuts/meson.build
@@ -0,0 +1,19 @@
+shortcuts_headers = [
+  'dzl-shortcut-accel-dialog.h',
+  'dzl-shortcut-chord.h',
+  'dzl-shortcut-context.h',
+  'dzl-shortcut-controller.h',
+  'dzl-shortcut-label.h',
+  'dzl-shortcut-manager.h',
+  'dzl-shortcut-model.h',
+  'dzl-shortcut-theme-editor.h',
+  'dzl-shortcut-theme.h',
+  'dzl-shortcuts-group.h',
+  'dzl-shortcuts-section.h',
+  'dzl-shortcuts-shortcut.h',
+  'dzl-shortcuts-window.h',
+]
+
+libdazzle_public_headers += files(shortcuts_headers)
+
+install_headers(shortcuts_headers, subdir: join_paths(libdazzle_header_subdir, 'shortcuts'))
diff --git a/src/statemachine/meson.build b/src/statemachine/meson.build
new file mode 100644
index 0000000..2bab1d9
--- /dev/null
+++ b/src/statemachine/meson.build
@@ -0,0 +1,10 @@
+statemachine_headers = [
+  'dzl-state-machine-buildable.h',
+  'dzl-state-machine.h',
+]
+
+foreach h: statemachine_headers
+  libdazzle_public_headers += files(h)
+endforeach
+
+install_headers(statemachine_headers, subdir: join_paths(libdazzle_header_subdir, 'statemachine'))
diff --git a/src/suggestions/meson.build b/src/suggestions/meson.build
new file mode 100644
index 0000000..9360d2c
--- /dev/null
+++ b/src/suggestions/meson.build
@@ -0,0 +1,13 @@
+suggestions_headers = [
+  'dzl-suggestion-entry-buffer.h',
+  'dzl-suggestion-entry.h',
+  'dzl-suggestion-popover.h',
+  'dzl-suggestion-row.h',
+  'dzl-suggestion.h',
+]
+
+foreach h: suggestions_headers
+  libdazzle_public_headers += files(h)
+endforeach
+
+install_headers(suggestions_headers, subdir: join_paths(libdazzle_header_subdir, 'suggestions'))
diff --git a/src/theming/meson.build b/src/theming/meson.build
new file mode 100644
index 0000000..8aa1fd1
--- /dev/null
+++ b/src/theming/meson.build
@@ -0,0 +1,8 @@
+theming_headers = [
+  'dzl-css-provider.h',
+  'dzl-theme-manager.h',
+]
+
+libdazzle_public_headers += files(theming_headers)
+
+install_headers(theming_headers, subdir: join_paths(libdazzle_header_subdir, 'theming'))
diff --git a/src/tree/meson.build b/src/tree/meson.build
new file mode 100644
index 0000000..2a34838
--- /dev/null
+++ b/src/tree/meson.build
@@ -0,0 +1,10 @@
+tree_headers = [
+  'dzl-tree-builder.h',
+  'dzl-tree-node.h',
+  'dzl-tree-types.h',
+  'dzl-tree.h',
+]
+
+libdazzle_public_headers += files(tree_headers)
+
+install_headers(tree_headers, subdir: join_paths(libdazzle_header_subdir, 'tree'))
diff --git a/src/util/meson.build b/src/util/meson.build
new file mode 100644
index 0000000..d1e8e9b
--- /dev/null
+++ b/src/util/meson.build
@@ -0,0 +1,14 @@
+util_headers = [
+  'dzl-cairo.h',
+  'dzl-counter.h',
+  'dzl-date-time.h',
+  'dzl-dnd.h',
+  'dzl-file-manager.h',
+  'dzl-heap.h',
+  'dzl-pango.h',
+  'dzl-rgba.h',
+]
+
+libdazzle_public_headers += files(util_headers)
+
+install_headers(util_headers, subdir: join_paths(libdazzle_header_subdir, 'util'))
diff --git a/src/widgets/meson.build b/src/widgets/meson.build
new file mode 100644
index 0000000..bc10ceb
--- /dev/null
+++ b/src/widgets/meson.build
@@ -0,0 +1,32 @@
+widgets_headers = [
+  'dzl-bin.h',
+  'dzl-bolding-label.h',
+  'dzl-box.h',
+  'dzl-centering-bin.h',
+  'dzl-column-layout.h',
+  'dzl-counters-window.h',
+  'dzl-elastic-bin.h',
+  'dzl-empty-state.h',
+  'dzl-entry-box.h',
+  'dzl-file-chooser-entry.h',
+  'dzl-list-box.h',
+  'dzl-list-box-row.h',
+  'dzl-multi-paned.h',
+  'dzl-pill-box.h',
+  'dzl-priority-box.h',
+  'dzl-progress-button.h',
+  'dzl-progress-menu-button.h',
+  'dzl-progress-icon.h',
+  'dzl-radio-box.h',
+  'dzl-scrolled-window.h',
+  'dzl-search-bar.h',
+  'dzl-simple-label.h',
+  'dzl-simple-popover.h',
+  'dzl-slider.h',
+  'dzl-stack-list.h',
+  'dzl-three-grid.h',
+]
+
+libdazzle_public_headers += files(widgets_headers)
+
+install_headers(widgets_headers, subdir: join_paths(libdazzle_header_subdir, 'widgets'))


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