[gnome-builder/wip/tingping/meson-rebase] build: Add support for Meson



commit 176c0e19d61881c66a0f195c397d460a05219ce8
Author: Patrick Griffis <tingping tingping se>
Date:   Sat Oct 1 09:10:00 2016 -0400

    build: Add support for Meson

 .editorconfig                                      |    3 +
 build/meson/meson_post_install.py                  |   21 +
 config.h.meson                                     |   49 ++
 contrib/egg/meson.build                            |  131 ++++
 contrib/gd/meson.build                             |   24 +
 contrib/gstyle/gstyle.map                          |    6 +
 contrib/gstyle/meson.build                         |  160 +++++
 contrib/gstyle/tests/Makefile.am                   |    2 +-
 contrib/gstyle/tests/meson.build                   |  100 +++
 contrib/jsonrpc-glib/meson.build                   |   76 ++
 contrib/libeditorconfig/meson.build                |   48 ++
 contrib/nautilus/meson.build                       |   18 +
 contrib/pnl/meson.build                            |  126 ++++
 contrib/pnl/pnl.map                                |    6 +
 contrib/rg/meson.build                             |   41 ++
 contrib/rg/rg.map                                  |    6 +
 contrib/search/meson.build                         |   21 +
 contrib/tmpl/Makefile.am                           |   27 +-
 contrib/tmpl/meson.build                           |  167 +++++
 contrib/tmpl/tmpl-expr-scanner.l                   |    3 -
 contrib/xml/meson.build                            |   21 +
 data/fonts/meson.build                             |    3 +
 data/gsettings/meson.build                         |   40 +
 data/icons/meson.build                             |   33 +
 data/meson.build                                   |   62 ++
 data/style-schemes/meson.build                     |    4 +
 doc/reference/libide/meson.build                   |   38 +
 doc/reference/libide/xml/gtkdocentities.ent.in     |    7 +
 doc/reference/libide/xml/meson.build               |   13 +
 doc/reference/libide/xml/tree_index.sgml           |   11 +
 help/meson.build                                   |    9 +
 libide/application/ide-application-plugins.c       |    2 +
 libide/editor/ide-editor-map-bin.c                 |    2 +
 .../editorconfig/ide-editorconfig-file-settings.c  |    2 +-
 libide/ide.map                                     |    7 +
 libide/meson.build                                 |  754 ++++++++++++++++++++
 libide/resources/meson.build                       |    5 +
 libide/workers/ide-worker-manager.c                |    2 +
 meson.build                                        |  195 +++++
 meson_options.txt                                  |   59 ++
 plugins/autotools-templates/meson.build            |   10 +
 plugins/autotools/meson.build                      |   41 ++
 plugins/beautifier/meson.build                     |   36 +
 plugins/c-pack/meson.build                         |   23 +
 plugins/cargo/meson.build                          |    5 +
 plugins/clang/meson.build                          |   46 ++
 plugins/cmake/meson.build                          |    6 +
 plugins/color-picker/meson.build                   |   47 ++
 plugins/command-bar/meson.build                    |   49 ++
 plugins/comment-code/meson.build                   |   26 +
 plugins/create-project/meson.build                 |   32 +
 plugins/ctags/meson.build                          |   36 +
 plugins/devhelp/meson.build                        |   36 +
 plugins/file-search/meson.build                    |   26 +
 plugins/flatpak/meson.build                        |   62 ++
 plugins/fpaste/meson.build                         |   10 +
 plugins/gcc/meson.build                            |   19 +
 plugins/gettext/meson.build                        |   19 +
 plugins/git/meson.build                            |   78 ++
 plugins/gnome-code-assistance/meson.build          |   32 +
 plugins/html-completion/meson.build                |   22 +
 plugins/html-preview/meson.build                   |   15 +
 plugins/jedi/meson.build                           |    5 +
 plugins/jhbuild/meson.build                        |    5 +
 plugins/meson-templates/meson.build                |   10 +
 plugins/meson.build                                |   53 ++
 plugins/meson/meson.build                          |    6 +
 plugins/mingw/meson.build                          |   21 +
 plugins/plugins.map                                |    6 +
 plugins/project-tree/meson.build                   |   53 ++
 plugins/python-gi-imports-completion/meson.build   |    8 +
 plugins/python-pack/meson.build                    |   21 +
 plugins/quick-highlight/meson.build                |   21 +
 plugins/rust-langserv/meson.build                  |    6 +
 plugins/rustup/meson.build                         |    9 +
 plugins/support/meson.build                        |   28 +
 plugins/symbol-tree/meson.build                    |   30 +
 plugins/sysmon/meson.build                         |   32 +
 plugins/sysprof/meson.build                        |   33 +
 plugins/terminal/meson.build                       |   46 ++
 plugins/todo/meson.build                           |    6 +
 plugins/vala-pack/meson.build                      |  100 +++
 plugins/xml-pack/meson.build                       |   51 ++
 po/meson.build                                     |    9 +
 tests/meson.build                                  |  227 ++++++
 tests/test-fuzzy.c                                 |    2 +-
 tools/meson.build                                  |    6 +
 87 files changed, 3761 insertions(+), 13 deletions(-)
---
diff --git a/.editorconfig b/.editorconfig
index 2ffcc4f..7729c22 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -45,4 +45,7 @@ indent_style = space
 [*.json]
 indent_size = 4
 tab_size = 4
+
+[meson.build]
+indent_size = 2
 indent_style = space
diff --git a/build/meson/meson_post_install.py b/build/meson/meson_post_install.py
new file mode 100755
index 0000000..cc5e2a6
--- /dev/null
+++ b/build/meson/meson_post_install.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+
+prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
+datadir = os.path.join(prefix, 'share')
+
+# Packaging tools define DESTDIR and this isn't needed for them
+if 'DESTDIR' not in os.environ:
+    print('Compiling gsettings schemas...')
+    subprocess.call(['glib-compile-schemas',
+                     os.path.join(datadir, 'glib-2.0', 'schemas')])
+
+    print('Updating icon cache...')
+    subprocess.call(['gtk-update-icon-cache', '-qtf',
+                     os.path.join(datadir, 'icons', 'hicolor')])
+
+    print('Updating desktop database...')
+    subprocess.call(['update-desktop-database', '-q',
+                     os.path.join(datadir, 'applications')])
diff --git a/config.h.meson b/config.h.meson
new file mode 100644
index 0000000..e28d97d
--- /dev/null
+++ b/config.h.meson
@@ -0,0 +1,49 @@
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#mesondefine ENABLE_NLS
+
+/* GETTEXT package name */
+#mesondefine GETTEXT_PACKAGE
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#mesondefine HAVE_GETTEXT
+
+/* Define to 1 if you have the `sched_getcpu' function. */
+#mesondefine HAVE_SCHED_GETCPU
+
+/* Name of package */
+#mesondefine PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#mesondefine PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#mesondefine PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#mesondefine PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#mesondefine PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#mesondefine PACKAGE_URL
+
+/* Define to the version of this package. */
+#mesondefine PACKAGE_VERSION
+
+#mesondefine PACKAGE_DATADIR
+
+#mesondefine PACKAGE_LIBDIR
+
+#mesondefine PACKAGE_LIBEXECDIR
+
+#mesondefine PACKAGE_LOCALE_DIR
+
+/* Version number of package */
+#mesondefine VERSION
+
+#mesondefine SRCDIR
+
+#mesondefine BUILDDIR
+
diff --git a/contrib/egg/meson.build b/contrib/egg/meson.build
new file mode 100644
index 0000000..12b0214
--- /dev/null
+++ b/contrib/egg/meson.build
@@ -0,0 +1,131 @@
+libegg_headers = [
+  'egg-animation.h',
+  'egg-binding-group.h',
+  'egg-box.h',
+  'egg-centering-bin.h',
+  'egg-column-layout.h',
+  'egg-counter.h',
+  'egg-date-time.h',
+  'egg-empty-state.h',
+  'egg-entry-box.h',
+  'egg-file-chooser-entry.h',
+  'egg-frame-source.h',
+  'egg-heap.h',
+  'egg-list-box.h',
+  'egg-menu-manager.h',
+  'egg-pill-box.h',
+  'egg-priority-box.h',
+  'egg-private.h',
+  'egg-radio-box.h',
+  'egg-scrolled-window.h',
+  'egg-search-bar.h',
+  'egg-settings-flag-action.h',
+  'egg-settings-sandwich.h',
+  'egg-signal-group.h',
+  'egg-simple-label.h',
+  'egg-simple-popover.h',
+  'egg-slider.h',
+  'egg-state-machine-buildable.h',
+  'egg-state-machine.h',
+  'egg-task-cache.h',
+  'egg-three-grid.h',
+  'egg-widget-action-group.h',
+]
+
+install_headers(libegg_headers,
+  subdir: 'gnome-builder-' + meson.project_version() + '/egg'
+)
+
+libegg_resources = gnome.compile_resources('egg-resources', 'egg.gresource.xml',
+  c_name: 'egg',
+)
+
+libegg_sources = [
+  'egg-animation.c',
+  'egg-binding-group.c',
+  'egg-box.c',
+  'egg-centering-bin.c',
+  'egg-column-layout.c',
+  'egg-counter.c',
+  'egg-date-time.c',
+  'egg-empty-state.c',
+  'egg-entry-box.c',
+  'egg-file-chooser-entry.c',
+  'egg-frame-source.c',
+  'egg-heap.c',
+  'egg-list-box.c',
+  'egg-menu-manager.c',
+  'egg-pill-box.c',
+  'egg-priority-box.c',
+  'egg-radio-box.c',
+  'egg-scrolled-window.c',
+  'egg-search-bar.c',
+  'egg-settings-flag-action.c',
+  'egg-settings-sandwich.c',
+  'egg-signal-group.c',
+  'egg-simple-label.c',
+  'egg-simple-popover.c',
+  'egg-slider.c',
+  'egg-state-machine-buildable.c',
+  'egg-state-machine.c',
+  'egg-task-cache.c',
+  'egg-three-grid.c',
+  'egg-widget-action-group.c',
+]
+
+libegg_deps = [
+  libgio_dep,
+  libgtk_dep,
+  libm_dep,
+  dependency('gmodule-2.0'),
+]
+
+libegg_args = []
+if get_option('enable_rdtscp')
+  libegg_args += '-DEGG_HAVE_RDTSCP'
+endif
+
+shm_dep = cc.find_library('rt', required: false)
+
+libegg = shared_library('egg-private', libegg_sources + [libegg_resources[0], libegg_resources[1]],
+  dependencies: libegg_deps + [shm_dep],
+  c_args: libegg_args,
+  version: '0.0.0',
+  install: true,
+  install_dir: pkglibdir,
+)
+
+libegg_dep = declare_dependency(
+  link_with: libegg,
+  dependencies: libegg_deps,
+  include_directories: include_directories('.'),
+)
+
+if get_option('with_introspection')
+
+  libegg_gir = gnome.generate_gir(libegg,
+    sources: libegg_sources + libegg_headers,
+    nsversion: '1.0',
+    namespace: 'Egg',
+    symbol_prefix: 'egg',
+    identifier_prefix: 'Egg',
+    includes: ['Gdk-3.0', 'Gio-2.0', 'Gtk-3.0'],
+    install: true,
+    install_dir_gir: pkggirdir,
+    install_dir_typelib: pkgtypelibdir,
+    extra_args: [
+      '--c-include=egg-private.h',
+    ]
+  )
+
+  if get_option('with_vapi')
+
+    libegg_vapi = gnome.generate_vapi('egg-private',
+      sources: libegg_gir[0],
+      packages: ['gio-2.0', 'gtk+-3.0'],
+      install: true,
+      install_dir: pkgvapidir,
+    )
+
+  endif
+endif
diff --git a/contrib/gd/meson.build b/contrib/gd/meson.build
new file mode 100644
index 0000000..abb3248
--- /dev/null
+++ b/contrib/gd/meson.build
@@ -0,0 +1,24 @@
+libgd_resources = gnome.compile_resources('gd-resources',
+  'gd-tagged-entry.gresource.xml',
+  c_name: 'gd',
+)
+
+libgd_sources = [
+  'gd-tagged-entry.c',
+  libgd_resources,
+]
+
+libgd_deps = [
+  libgio_dep,
+  libgtk_dep,
+]
+
+libgd = static_library('gd', libgd_sources,
+  dependencies: libgd_deps,
+  pic: true,
+)
+
+libgd_dep = declare_dependency(
+  link_with: libgd,
+  include_directories: include_directories('.'),
+)
diff --git a/contrib/gstyle/gstyle.map b/contrib/gstyle/gstyle.map
new file mode 100644
index 0000000..bfc7532
--- /dev/null
+++ b/contrib/gstyle/gstyle.map
@@ -0,0 +1,6 @@
+{
+global:
+        gstyle_*;
+local:
+        *;
+};
diff --git a/contrib/gstyle/meson.build b/contrib/gstyle/meson.build
new file mode 100644
index 0000000..601e840
--- /dev/null
+++ b/contrib/gstyle/meson.build
@@ -0,0 +1,160 @@
+libgstyle_headers = [
+  'gstyle-animation.h',
+  'gstyle-cielab.h',
+  'gstyle-color.h',
+  'gstyle-color-component.h',
+  'gstyle-color-convert.h',
+  'gstyle-color-filter.h',
+  'gstyle-color-item.h',
+  'gstyle-color-panel.h',
+  'gstyle-color-panel-private.h',
+  'gstyle-color-panel-actions.h',
+  'gstyle-color-plane.h',
+  'gstyle-color-predefined.h',
+  'gstyle-color-scale.h',
+  'gstyle-color-widget.h',
+  'gstyle-color-widget-actions.h',
+  'gstyle-colorlexer.h',
+  'gstyle-css-provider.h',
+  'gstyle-eyedropper.h',
+  'gstyle-hsv.h',
+  'gstyle-palette.h',
+  'gstyle-palette-widget.h',
+  'gstyle-private.h',
+  'gstyle-rename-popover.h',
+  'gstyle-revealer.h',
+  'gstyle-slidein.h',
+  'gstyle-types.h',
+  'gstyle-utils.h',
+  'gstyle-xyz.h',
+]
+
+libgstyle_header_dir = join_paths(get_option('includedir'),
+  'gnome-builder-' + meson.project_version(), 'gstyle')
+
+install_headers(libgstyle_headers,
+  install_dir: libgstyle_header_dir,
+)
+
+libgstyle_resources = gnome.compile_resources('gstyle-resources',
+  'gstyle.gresource.xml',
+  c_name: 'gstyle',
+)
+
+libgstyle_sources = [
+  'gstyle-animation.c',
+  'gstyle-cielab.c',
+  'gstyle-color.c',
+  'gstyle-color-component.c',
+  'gstyle-color-convert.c',
+  'gstyle-color-filter.c',
+  'gstyle-color-item.c',
+  'gstyle-color-panel.c',
+  'gstyle-color-panel-actions.c',
+  'gstyle-color-plane.c',
+  'gstyle-color-scale.c',
+  'gstyle-color-widget.c',
+  'gstyle-color-widget-actions.c',
+  'gstyle-colorlexer.c',
+  'gstyle-css-provider.c',
+  'gstyle-eyedropper.c',
+  'gstyle-hsv.c',
+  'gstyle-palette.c',
+  'gstyle-palette-widget.c',
+  'gstyle-rename-popover.c',
+  'gstyle-revealer.c',
+  'gstyle-slidein.c',
+  'gstyle-utils.c',
+  'gstyle-xyz.c',
+  libgstyle_resources[0],
+]
+
+libgstyle_deps = [
+  libgtk_dep,
+  libsearch_dep,
+  libxml_dep,
+  libm_dep,
+]
+
+libgstyle_link_args = '-Wl,--version-script=' + join_paths(meson.current_source_dir(), 'gstyle.map')
+libgstyle = shared_library('gstyle-private', libgstyle_sources,
+  dependencies: libgstyle_deps,
+  link_args: libgstyle_link_args,
+  link_depends: 'gstyle.map',
+  version: '0.0.0',
+  install: true,
+  install_dir: pkglibdir,
+)
+
+libgstyle_dep = declare_dependency(
+  link_with: libgstyle,
+  dependencies: libgstyle_deps,
+  include_directories: include_directories('.'),
+)
+
+if get_option('with_introspection')
+
+  libgstyle_introspection_sources = [
+    'gstyle-cielab.h',
+    'gstyle-cielab.c',
+    'gstyle-color.h',
+    'gstyle-color.c',
+    'gstyle-color-component.h',
+    'gstyle-color-component.c',
+    'gstyle-color-convert.h',
+    'gstyle-color-convert.c',
+    'gstyle-color-filter.h',
+    'gstyle-color-filter.c',
+    'gstyle-color-item.h',
+    'gstyle-color-item.c',
+    'gstyle-color-panel.h',
+    'gstyle-color-panel.c',
+    'gstyle-color-plane.h',
+    'gstyle-color-plane.c',
+    'gstyle-color-scale.h',
+    'gstyle-color-scale.c',
+    'gstyle-color-widget.h',
+    'gstyle-color-widget.c',
+    'gstyle-eyedropper.h',
+    'gstyle-eyedropper.c',
+    'gstyle-hsv.h',
+    'gstyle-hsv.c',
+    'gstyle-palette.h',
+    'gstyle-palette.c',
+    'gstyle-palette-widget.h',
+    'gstyle-palette-widget.c',
+    'gstyle-slidein.h',
+    'gstyle-slidein.c',
+    'gstyle-xyz.h',
+    'gstyle-xyz.c',
+  ]
+
+  libgstyle_gir = gnome.generate_gir(libgstyle,
+    sources: libgstyle_introspection_sources,
+    nsversion: '1.0',
+    namespace: 'Gstyle',
+    symbol_prefix: 'gstyle',
+    identifier_prefix: 'Gstyle',
+    includes: ['Gdk-3.0', 'Gio-2.0', 'Gtk-3.0', 'GtkSource-3.0'],
+    install: true,
+    install_dir_gir: pkggirdir,
+    install_dir_typelib: pkgtypelibdir,
+    extra_args: [
+      '--c-include=gstyle-private.h',
+    ],
+  )
+
+  if get_option('with_vapi')
+
+    libgstyle_vapi = gnome.generate_vapi('gstyle-private',
+      sources: libgstyle_gir[0],
+      packages: ['gio-2.0', 'gtk+-3.0', 'GtkSource-3.0'],
+      install: true,
+      install_dir: pkgvapidir,
+    )
+
+  endif
+
+endif
+
+subdir('tests')
diff --git a/contrib/gstyle/tests/Makefile.am b/contrib/gstyle/tests/Makefile.am
index c553ae5..f507cb0 100644
--- a/contrib/gstyle/tests/Makefile.am
+++ b/contrib/gstyle/tests/Makefile.am
@@ -4,7 +4,7 @@ gstyle_cflags =                              \
        $(DEBUG_CFLAGS)                      \
        $(GSTYLE_CFLAGS)                     \
        -I$(top_srcdir)/contrib/gstyle       \
-       -DTEST_DATA_DIR="\"$(abs_builddir)/data\"" \
+       -DTEST_DATA_DIR="\"$(abs_srcdir)/data\"" \
        $(NULL)
 
 gstyle_libs =                                               \
diff --git a/contrib/gstyle/tests/meson.build b/contrib/gstyle/tests/meson.build
new file mode 100644
index 0000000..125c5cc
--- /dev/null
+++ b/contrib/gstyle/tests/meson.build
@@ -0,0 +1,100 @@
+gstyle_test_env = [
+  'GB_IN_TREE_PLUGINS=1',
+  'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+  'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+  'G_DEBUG=gc-friendly',
+  'GSETTINGS_BACKEND=memory',
+  'MALLOC_CHECK_=2',
+#  'MALLOC_PERTURB_=$((${RANDOM:-256} % 256))',
+]
+gstyle_test_cflags = [
+  '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir()),
+]
+
+gstyle_color = executable('test-gstyle-color',
+  'test-gstyle-color.c',
+  dependencies: libgstyle_dep,
+)
+test('test-gstyle-color', gstyle_color,
+  env: gstyle_test_env
+)
+
+
+gstyle_color_panel = executable('test-gstyle-color-panel',
+  'test-gstyle-color-panel.c',
+  c_args: gstyle_test_cflags,
+  dependencies: libgstyle_dep,
+)
+test('test-gstyle-color-panel', gstyle_color_panel,
+  env: gstyle_test_env
+)
+
+
+gstyle_color_plane = executable('test-gstyle-color-plane',
+  'test-gstyle-color-plane.c',
+  c_args: gstyle_test_cflags,
+  dependencies: libgstyle_dep,
+)
+#test('test-gstyle-color-plane', gstyle_color_plane,
+#  env: gstyle_test_env
+#)
+
+
+gstyle_color_scale = executable('test-gstyle-color-scale',
+  'test-gstyle-color-scale.c',
+  c_args: gstyle_test_cflags,
+  dependencies: libgstyle_dep,
+)
+#test('test-gstyle-color-scale', gstyle_color_scale,
+#  env: gstyle_test_env
+#)
+
+
+gstyle_color_widget = executable('test-gstyle-color-widget',
+  'test-gstyle-color-widget.c',
+  c_args: gstyle_test_cflags,
+  dependencies: libgstyle_dep,
+)
+#test('test-gstyle-color-widget', gstyle_color_widget,
+#  env: gstyle_test_env
+#)
+
+
+gstyle_filter = executable('test-gstyle-filter',
+  'test-gstyle-filter.c',
+  c_args: gstyle_test_cflags,
+  dependencies: libgstyle_dep,
+)
+#test('test-gstyle-filter', gstyle_filter,
+#  env: gstyle_test_env
+#)
+
+
+gstyle_palette = executable('test-gstyle-palette',
+  'test-gstyle-palette.c',
+  c_args: gstyle_test_cflags,
+  dependencies: libgstyle_dep,
+)
+test('test-gstyle-palette', gstyle_palette,
+  env: gstyle_test_env
+)
+
+
+gstyle_palette_widget = executable('test-gstyle-palette-widget',
+  'test-gstyle-palette-widget.c',
+  c_args: gstyle_test_cflags,
+  dependencies: libgstyle_dep,
+)
+test('test-gstyle-color-palette-widget', gstyle_palette_widget,
+  env: gstyle_test_env
+)
+
+
+gstyle_parse = executable('test-gstyle-color-parse',
+  'test-gstyle-parse.c',
+  c_args: gstyle_test_cflags,
+  dependencies: libgstyle_dep,
+)
+test('test-gstyle-parse', gstyle_parse,
+  env: gstyle_test_env
+)
diff --git a/contrib/jsonrpc-glib/meson.build b/contrib/jsonrpc-glib/meson.build
new file mode 100644
index 0000000..83dad16
--- /dev/null
+++ b/contrib/jsonrpc-glib/meson.build
@@ -0,0 +1,76 @@
+libjsonrpc_public_sources = [
+  'jsonrpc-client.c',
+  'jsonrpc-client.h',
+  'jsonrpc-input-stream.c',
+  'jsonrpc-input-stream.h',
+  'jsonrpc-output-stream.c',
+  'jsonrpc-output-stream.h',
+  'jsonrpc-server.c',
+  'jsonrpc-server.h',
+]
+
+libjsonrpc_api_version = '1.0'
+
+jsonrpc_conf = configuration_data()
+# TODO: This is just based on gnome-builders version
+jsonrpc_conf.set('VERSION', meson.project_version())
+jsonrpc_conf.set('MAJOR_VERSION', MAJOR_VERSION)
+jsonrpc_conf.set('MINOR_VERSION', MINOR_VERSION)
+jsonrpc_conf.set('MICRO_VERSION', MICRO_VERSION)
+configure_file(
+  input: 'jsonrpc-version.h.in',
+  output: 'jsonrpc-version.h',
+  configuration: jsonrpc_conf,
+)
+
+libjsonrpc_private_sources = [
+  'jcon.c',
+]
+
+libjsonrpc_deps = [
+  libjson_glib_dep,
+]
+
+libjsonrpc = shared_library('jsonrpc-glib-' + libjsonrpc_api_version,
+  libjsonrpc_private_sources + libjsonrpc_public_sources,
+  dependencies: libjsonrpc_deps,
+  version: '0.0.0',
+  c_args: ['-DJSONRPC_GLIB_COMPILATION'],
+  install: true,
+  install_dir: pkglibdir,
+)
+
+libjsonrpc_dep = declare_dependency(
+  link_with: libjsonrpc,
+  include_directories: include_directories('.'),
+)
+
+if get_option('with_introspection')
+
+  libjsonrpc_gir = gnome.generate_gir(libjsonrpc,
+    sources: libjsonrpc_public_sources,
+    nsversion: libjsonrpc_api_version,
+    namespace: 'Jsonrpc',
+    symbol_prefix: 'jsonrpc',
+    identifier_prefix: 'Jsonrpc',
+    includes: ['Gio-2.0', 'Json-1.0'],
+    install: true,
+    install_dir_gir: pkggirdir,
+    install_dir_typelib: pkgtypelibdir,
+    extra_args: [
+      '-DTMPL_GLIB_COMPILATION',
+      '--c-include=jsonrpc-glib.h',
+    ]
+  )
+
+  if get_option('with_vapi')
+
+    libjsonrpc_vapi = gnome.generate_vapi('jsonrpc-glib-' + libjsonrpc_api_version,
+      sources: libjsonrpc_gir[0],
+      packages: ['gio-2.0', 'json-glib-1.0'],
+      install: true,
+      install_dir: pkgvapidir,
+    )
+
+  endif
+endif
diff --git a/contrib/libeditorconfig/meson.build b/contrib/libeditorconfig/meson.build
new file mode 100644
index 0000000..0fc0b8c
--- /dev/null
+++ b/contrib/libeditorconfig/meson.build
@@ -0,0 +1,48 @@
+if get_option('with_editorconfig')
+
+libeditorconfig_sources = [
+  'ec_glob.c',
+  'ec_glob.h',
+  'editorconfig.c',
+  'editorconfig.h',
+  'editorconfig/editorconfig.h',
+  'editorconfig/editorconfig_handle.h',
+  'editorconfig_handle.c',
+  'editorconfig_handle.h',
+  'global.h',
+  'ini.c',
+  'ini.h',
+  'misc.c',
+  'misc.h',
+  'utarray.h',
+]
+
+libeditorconfig_deps = [
+  dependency('libpcre')
+]
+
+# FIXME: Actually test these
+libeditorconfig_args = [
+       '-DHAVE_STRCASECMP',
+       '-DHAVE_STRICMP',
+       '-DHAVE_STRDUP',
+       '-DHAVE_STRNDUP',
+       '-DUNIX',
+       '-Deditorconfig_VERSION_MAJOR=0',
+       '-Deditorconfig_VERSION_MINOR=0',
+       '-Deditorconfig_VERSION_PATCH=0',
+       '-Deditorconfig_VERSION_SUFFIX=0',
+]
+
+libeditorconfig = static_library('editorconfig',
+  libeditorconfig_sources,
+  dependencies: libeditorconfig_deps,
+  c_args: libeditorconfig_args,
+  pic: true,
+)
+
+libeditorconfig_dep = declare_dependency(
+  link_with: libeditorconfig,
+  include_directories: include_directories('.'),
+)
+endif
diff --git a/contrib/nautilus/meson.build b/contrib/nautilus/meson.build
new file mode 100644
index 0000000..57a9526
--- /dev/null
+++ b/contrib/nautilus/meson.build
@@ -0,0 +1,18 @@
+libnautilus_sources = [
+  'nautilus-floating-bar.c',
+]
+
+libnautilus_deps = [
+  libgio_dep,
+  libgtk_dep,
+]
+
+libnautilus = static_library('nautilus', libnautilus_sources,
+  dependencies: libnautilus_deps,
+  pic: true,
+)
+
+libnautilus_dep = declare_dependency(
+  link_with: libnautilus,
+  include_directories: include_directories('.'),
+)
diff --git a/contrib/pnl/meson.build b/contrib/pnl/meson.build
new file mode 100644
index 0000000..1e53ead
--- /dev/null
+++ b/contrib/pnl/meson.build
@@ -0,0 +1,126 @@
+libpnl_headers = [
+  'pnl-animation.h',
+  'pnl-dock-bin.h',
+  'pnl-dock-bin-edge.h',
+  'pnl-dock-item.h',
+  'pnl-dock-manager.h',
+  'pnl-dock-overlay.h',
+  'pnl-dock-overlay-edge.h',
+  'pnl-dock-paned.h',
+  'pnl-dock-revealer.h',
+  'pnl-dock-stack.h',
+  'pnl-dock-types.h',
+  'pnl-dock-widget.h',
+  'pnl-dock-window.h',
+  'pnl-dock.h',
+  'pnl-frame-source.h',
+  'pnl-multi-paned.h',
+  'pnl-tab-strip.h',
+  'pnl-tab.h',
+  'pnl.h',
+]
+
+libpnl_header_dir = get_option('includedir') + '/gnome-builder-' + meson.project_version() + '/pnl'
+
+libpnl_conf = configuration_data()
+libpnl_conf.set('MAJOR_VERSION', MAJOR_VERSION)
+libpnl_conf.set('MINOR_VERSION', MINOR_VERSION)
+libpnl_conf.set('MICRO_VERSION', MICRO_VERSION)
+libpnl_conf.set('VERSION', meson.project_version())
+
+libpnl_version_h = configure_file(
+  input: 'pnl-version.h.in',
+  output: 'pnl-version.h',
+  configuration: libpnl_conf,
+  install: true,
+  install_dir: libpnl_header_dir,
+)
+
+install_headers(libpnl_headers,
+  install_dir: libpnl_header_dir,
+)
+
+libpnl_resources = gnome.compile_resources('pnl-resources',
+  'pnl.gresource.xml',
+  c_name: 'pnl',
+)
+
+libpnl_sources = [
+  'pnl-animation.c',
+  'pnl-dock-bin-edge.c',
+  'pnl-dock-bin-edge-private.h',
+  'pnl-dock-bin.c',
+  'pnl-dock-item.c',
+  'pnl-dock-manager.c',
+  'pnl-dock-overlay-edge.c',
+  'pnl-dock-overlay.c',
+  'pnl-dock-paned-private.h',
+  'pnl-dock-paned.c',
+  'pnl-dock-revealer.c',
+  'pnl-dock-stack.c',
+  'pnl-dock-tab-strip.c',
+  'pnl-dock-tab-strip.h',
+  'pnl-dock-transient-grab.c',
+  'pnl-dock-transient-grab.h',
+  'pnl-dock-widget.c',
+  'pnl-dock-window.c',
+  'pnl-dock.c',
+  'pnl-frame-source.c',
+  'pnl-multi-paned.c',
+  'pnl-tab-strip.c',
+  'pnl-tab.c',
+  'pnl-util-private.h',
+  'pnl-util.c',
+  libpnl_version_h,
+]
+
+libpnl_deps = [
+  dependency('gtk+-3.0'),
+]
+
+libpnl_link_args = '-Wl,--version-script=' + join_paths(meson.current_source_dir(), 'pnl.map')
+libpnl = shared_library('panel-gtk', libpnl_sources + [libpnl_resources[0],libpnl_resources[1]],
+  dependencies: libpnl_deps,
+  c_args: ['-DPNL_COMPILATION'],
+  link_args: libpnl_link_args,
+  link_depends: 'pnl.map',
+  version: '0.0.0',
+  install: true,
+  install_dir: pkglibdir,
+)
+
+libpnl_dep = declare_dependency(
+  sources: libpnl_version_h,
+  link_with: libpnl,
+  include_directories: include_directories('.'),
+)
+
+if get_option('with_introspection')
+
+  libpnl_gir = gnome.generate_gir(libpnl,
+    sources: libpnl_sources + libpnl_headers,
+    nsversion: '1.0',
+    namespace: 'Pnl',
+    symbol_prefix: 'pnl',
+    identifier_prefix: 'Pnl',
+    includes: ['Gdk-3.0', 'Gio-2.0', 'Gtk-3.0'],
+    install: true,
+    install_dir_gir: pkggirdir,
+    install_dir_typelib: pkgtypelibdir,
+    extra_args: [
+      '--c-include=pnl.h',
+      '-DPNL_COMPILATION',
+    ],
+  )
+
+  if get_option('with_vapi')
+
+    libpnl_vapi = gnome.generate_vapi('panel-gtk',
+      sources: libpnl_gir[0],
+      packages: ['gio-2.0', 'gtk+-3.0'],
+      install: true,
+      install_dir: pkgvapidir,
+    )
+
+  endif
+endif
diff --git a/contrib/pnl/pnl.map b/contrib/pnl/pnl.map
new file mode 100644
index 0000000..b733265
--- /dev/null
+++ b/contrib/pnl/pnl.map
@@ -0,0 +1,6 @@
+{
+global:
+        pnl_*;
+local:
+        *;
+};
diff --git a/contrib/rg/meson.build b/contrib/rg/meson.build
new file mode 100644
index 0000000..1f5f370
--- /dev/null
+++ b/contrib/rg/meson.build
@@ -0,0 +1,41 @@
+librg_sources = [
+  'realtime-graphs.h',
+  'rg-column.c',
+  'rg-column.h',
+  'rg-column-private.h',
+  'rg-cpu-graph.c',
+  'rg-cpu-graph.h',
+  'rg-cpu-table.c',
+  'rg-cpu-table.h',
+  'rg-graph.c',
+  'rg-graph.h',
+  'rg-line-renderer.c',
+  'rg-line-renderer.h',
+  'rg-renderer.c',
+  'rg-renderer.h',
+  'rg-ring.c',
+  'rg-ring.h',
+  'rg-table.c',
+  'rg-table.h',
+]
+
+librg_deps = [
+  libgio_dep,
+  libgtk_dep,
+  libegg_dep,
+]
+
+librg_link_args = '-Wl,--version-script=' + join_paths(meson.current_source_dir(), 'rg.map')
+librg = shared_library('rg', librg_sources,
+  dependencies: librg_deps,
+  link_args: librg_link_args,
+  link_depends: 'rg.map',
+  version: '0.0.0',
+  install: true,
+  install_dir: pkglibdir,
+)
+
+librg_dep = declare_dependency(
+  link_with: librg,
+  include_directories: include_directories('.'),
+)
diff --git a/contrib/rg/rg.map b/contrib/rg/rg.map
new file mode 100644
index 0000000..bcf6e27
--- /dev/null
+++ b/contrib/rg/rg.map
@@ -0,0 +1,6 @@
+{
+global:
+        rg_*;
+local:
+        *;
+};
diff --git a/contrib/search/meson.build b/contrib/search/meson.build
new file mode 100644
index 0000000..9991814
--- /dev/null
+++ b/contrib/search/meson.build
@@ -0,0 +1,21 @@
+libsearch_sources = [
+  'fuzzy.c',
+  'trie.c',
+]
+
+libsearch_deps = [
+  dependency('gobject-2.0'),
+]
+
+libsearch = shared_library('search', libsearch_sources,
+  dependencies: libsearch_deps,
+  version: '0.0.0',
+  install: true,
+  install_dir: pkglibdir,
+)
+
+libsearch_dep = declare_dependency(
+  link_with: libsearch,
+  dependencies: libsearch_deps,
+  include_directories: include_directories('.'),
+)
diff --git a/contrib/tmpl/Makefile.am b/contrib/tmpl/Makefile.am
index fcc3c83..5699a21 100644
--- a/contrib/tmpl/Makefile.am
+++ b/contrib/tmpl/Makefile.am
@@ -1,6 +1,22 @@
 DISTCLEANFILES =
 CLEANFILES =
-BUILT_SOURCES =
+
+BUILT_SOURCES = \
+       tmpl-expr-parser.c \
+       tmpl-expr-parser.h \
+       tmpl-expr-scanner.c \
+       tmpl-expr-scanner.h
+
+tmpl-expr-scanner.c tmpl-expr-scanner.h: tmpl-expr-scanner.l
+       $(AM_V_GEN)$(LEX) -o $@ $<
+
+tmpl-expr-scanner.h: tmpl-expr-scanner.c
+
+tmpl-expr-parser.c tmpl-expr-parser.h: tmpl-expr-parser.y tmpl-expr-scanner.h
+       $(AM_V_GEN)$(YACC) $< --defines=tmpl-expr-parser.h --output=$@
+
+tmpl-expr-parser.h: tmpl-expr-parser.c
+
 
 pkglib_LTLIBRARIES = libtemplate-glib-1.0.la
 
@@ -9,10 +25,7 @@ AM_CPPFLAGS = \
        -DTMPL_GLIB_COMPILATION
 
 EXTRA_DIST = \
-       tmpl-expr-parser.c \
-       tmpl-expr-parser.h \
-       tmpl-expr-scanner.c \
-       tmpl-expr-scanner.h \
+       $(BUILT_SOURCES) \
        $(NULL)
 
 pkgincludedir = $(includedir)/gnome-builder-@VERSION@/template-glib
@@ -41,9 +54,9 @@ libtemplate_glib_1_0_la_SOURCES = \
        tmpl-expr-node.c \
        tmpl-expr-node.h \
        tmpl-expr-parser-private.h \
-       tmpl-expr-parser.y \
+       tmpl-expr-parser.c \
        tmpl-expr-private.h \
-       tmpl-expr-scanner.l \
+       tmpl-expr-scanner.c \
        tmpl-expr.c \
        tmpl-gi-private.h \
        tmpl-gi.c \
diff --git a/contrib/tmpl/meson.build b/contrib/tmpl/meson.build
new file mode 100644
index 0000000..bb2dfc9
--- /dev/null
+++ b/contrib/tmpl/meson.build
@@ -0,0 +1,167 @@
+libtmpl_enum_headers = [
+  'tmpl-error.h',
+  'tmpl-expr-types.h',
+]
+
+libtmpl_headers_subdir = 'gnome-builder-' + meson.project_version() + '/template-glib'
+libtmpl_headers_dir = join_paths(get_option('includedir'), libtmpl_headers_subdir)
+
+libtmpl_enums = gnome.mkenums('tmpl-enums',
+  h_template: 'tmpl-enums.h.in',
+  c_template: 'tmpl-enums.c.in',
+  sources: libtmpl_enum_headers,
+)
+
+libtmpl_conf = configuration_data()
+libtmpl_conf.set10('ENABLE_TRACING', get_option('enable_tracing'))
+libtmpl_debug = configure_file(
+  input: 'tmpl-debug.h.in',
+  output: 'tmpl-debug.h',
+  configuration: libtmpl_conf,
+)
+
+libtmpl_headers = [
+  'tmpl-error.h',
+  'tmpl-expr-types.h',
+  'tmpl-expr.h',
+  'tmpl-glib.h',
+  'tmpl-scope.h',
+  'tmpl-symbol.h',
+  'tmpl-template-locator.h',
+  'tmpl-template.h',
+]
+
+install_headers(libtmpl_headers,
+  subdir: libtmpl_headers_subdir
+)
+
+libtmpl_generated_headers = [
+  libtmpl_debug,
+  libtmpl_enums[1],
+]
+
+libtmpl_sources = libtmpl_generated_headers + libtmpl_headers + [
+  libtmpl_enums[0],
+  'tmpl-branch-node.c',
+  'tmpl-branch-node.h',
+  'tmpl-condition-node.c',
+  'tmpl-condition-node.h',
+  'tmpl-error.c',
+  'tmpl-expr-eval.c',
+  'tmpl-expr-node.c',
+  'tmpl-expr-node.h',
+  'tmpl-expr-parser-private.h',
+  'tmpl-expr-private.h',
+  'tmpl-expr.c',
+  'tmpl-gi-private.h',
+  'tmpl-gi.c',
+  'tmpl-iter-node.c',
+  'tmpl-iter-node.h',
+  'tmpl-iterator.c',
+  'tmpl-iterator.h',
+  'tmpl-lexer.c',
+  'tmpl-lexer.h',
+  'tmpl-node.c',
+  'tmpl-node.h',
+  'tmpl-parser.c',
+  'tmpl-parser.h',
+  'tmpl-scope.c',
+  'tmpl-symbol.c',
+  'tmpl-template-locator.c',
+  'tmpl-template.c',
+  'tmpl-text-node.c',
+  'tmpl-text-node.h',
+  'tmpl-token-input-stream.c',
+  'tmpl-token-input-stream.h',
+  'tmpl-token.c',
+  'tmpl-token.h',
+  'tmpl-util-private.h',
+  'tmpl-util.c',
+]
+
+libtmpl_deps = [
+  libgio_dep,
+  dependency('gobject-introspection-1.0', version: '>= 1.48.0'),
+  libm_dep,
+]
+
+flex = find_program('flex')
+bison = find_program('bison')
+
+lgen = generator(flex,
+  output : '@BASENAME@.c',
+  arguments : ['-o', '@OUTPUT@', '@INPUT@']
+)
+
+pgen = generator(bison,
+  output : ['@BASENAME@.c', '@BASENAME@.h'],
+  arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@']
+)
+
+libtmpl_sources = libtmpl_sources + [
+  lgen.process('tmpl-expr-scanner.l'),
+  pgen.process('tmpl-expr-parser.y'),
+]
+
+libtmpl_api_version = '1.0'
+
+libtmpl = shared_library('template-glib-' + libtmpl_api_version, libtmpl_sources,
+  dependencies: libtmpl_deps,
+  version: '0.0.0',
+  c_args: ['-DTMPL_GLIB_COMPILATION'],
+  install: true,
+  install_dir: pkglibdir,
+)
+
+libtmpl_dep = declare_dependency(
+  sources: libtmpl_generated_headers,
+  link_with: libtmpl,
+  include_directories: include_directories('.'),
+)
+
+if get_option('with_introspection')
+
+  libtmpl_introspection_sources = [
+    libtmpl_enums[0],
+    libtmpl_enums[1],
+    'tmpl-error.c',
+    'tmpl-error.h',
+    'tmpl-expr.c',
+    'tmpl-expr.h',
+    'tmpl-expr-types.h',
+    'tmpl-scope.c',
+    'tmpl-scope.h',
+    'tmpl-symbol.c',
+    'tmpl-symbol.h',
+    'tmpl-template-locator.c',
+    'tmpl-template-locator.h',
+    'tmpl-template.c',
+    'tmpl-template.h',
+  ]
+
+  libtmpl_gir = gnome.generate_gir(libtmpl,
+    sources: libtmpl_introspection_sources,
+    nsversion: libtmpl_api_version,
+    namespace: 'Template',
+    symbol_prefix: 'tmpl',
+    identifier_prefix: 'Tmpl',
+    includes: ['Gio-2.0'],
+    install: true,
+    install_dir_gir: pkggirdir,
+    install_dir_typelib: pkgtypelibdir,
+    extra_args: [
+      '-DTMPL_GLIB_COMPILATION',
+    ]
+  )
+
+  if get_option('with_vapi')
+
+    libtmpl_vapi = gnome.generate_vapi('template-glib-' + libtmpl_api_version,
+      sources: [libtmpl_gir[0], 'Template-1.0.metadata'],
+      packages: 'gio-2.0',
+      install: true,
+      install_dir: pkgvapidir,
+    )
+
+  endif
+endif
diff --git a/contrib/tmpl/tmpl-expr-scanner.l b/contrib/tmpl/tmpl-expr-scanner.l
index afe2435..9197390 100644
--- a/contrib/tmpl/tmpl-expr-scanner.l
+++ b/contrib/tmpl/tmpl-expr-scanner.l
@@ -5,9 +5,6 @@
 %option yylineno
 %option nodefault
 
-%option header-file="tmpl-expr-scanner.h"
-%option outfile="tmpl-expr-scanner.c"
-
 %{
 # include "tmpl-error.h"
 # include "tmpl-expr-private.h"
diff --git a/contrib/xml/meson.build b/contrib/xml/meson.build
new file mode 100644
index 0000000..7332c8a
--- /dev/null
+++ b/contrib/xml/meson.build
@@ -0,0 +1,21 @@
+libxml_sources = [
+  'xml-reader.c',
+]
+
+libxml2_dep = dependency('libxml-2.0', version: '>=2.9.0')
+
+libxml_deps = [
+  libgio_dep,
+  libxml2_dep,
+]
+
+libxml = static_library('xml', libxml_sources,
+  dependencies: libxml_deps,
+  pic: true,
+)
+
+libxml_dep = declare_dependency(
+  link_with: libxml,
+  dependencies: libxml2_dep,
+  include_directories: include_directories('.'),
+)
diff --git a/data/fonts/meson.build b/data/fonts/meson.build
new file mode 100644
index 0000000..5f30e09
--- /dev/null
+++ b/data/fonts/meson.build
@@ -0,0 +1,3 @@
+install_data([
+  'BuilderBlocks.ttf',
+], install_dir: join_paths(get_option('datadir'), 'gnome-builder/fonts'))
diff --git a/data/gsettings/meson.build b/data/gsettings/meson.build
new file mode 100644
index 0000000..8ede17f
--- /dev/null
+++ b/data/gsettings/meson.build
@@ -0,0 +1,40 @@
+schema_dir = join_paths(get_option('datadir'), 'glib-2.0', 'schemas')
+
+# Perhaps this should be moved to the plugin
+ctags_path = 'ctags'
+ctags = find_program('ctags-exuberant', required: false)
+if not ctags.found()
+  ctags = find_program('exctags', required: false)
+  if not ctags.found()
+    ctags = find_program('ectags', required: false)
+    if not ctags.found()
+      ctags = find_program('ctags', required: false)
+    endif
+  endif
+endif
+if ctags.found()
+  ctags_path = ctags.path()
+endif
+
+schema_conf = configuration_data()
+schema_conf.set('ECTAGS', ctags_path)
+
+configure_file(
+  input: 'org.gnome.builder.code-insight.gschema.xml.in',
+  output: 'org.gnome.builder.code-insight.gschema.xml',
+  configuration: schema_conf,
+  install: true,
+  install_dir: schema_dir,
+)
+
+install_data([
+  'org.gnome.builder.build.gschema.xml',
+  'org.gnome.builder.editor.gschema.xml',
+  'org.gnome.builder.editor.language.gschema.xml',
+  'org.gnome.builder.extension-type.gschema.xml',
+  'org.gnome.builder.gschema.xml',
+  'org.gnome.builder.plugin.gschema.xml',
+  'org.gnome.builder.project-tree.gschema.xml',
+  'org.gnome.builder.terminal.gschema.xml',
+  'org.gnome.builder.workbench.gschema.xml',
+], install_dir: schema_dir)
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 0000000..98bc8e3
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1,33 @@
+icondir = join_paths(get_option('datadir'), 'icons/hicolor')
+
+install_subdir('hicolor/16x16',
+  install_dir: icondir,
+)
+
+install_subdir('hicolor/24x24',
+  install_dir: icondir,
+)
+
+install_subdir('hicolor/512x512',
+  install_dir: icondir,
+)
+
+install_subdir('hicolor/symbolic',
+  install_dir: icondir,
+)
+
+# Sadly some of these directories have unrelated files
+# TODO: Make this cleaner upstream
+
+install_data('hicolor/32x32/apps/org.gnome.Builder.png',
+  install_dir: join_paths(icondir, '32x32/apps'),
+)
+
+install_data('hicolor/48x48/apps/org.gnome.Builder.png',
+  install_dir: join_paths(icondir, '48x48/apps'),
+)
+
+install_data('hicolor/256x256/apps/org.gnome.Builder.png',
+  install_dir: join_paths(icondir, '256x256/apps'),
+)
+
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..ec8721e
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,62 @@
+msgfmt = find_program('msgfmt')
+podir = join_paths(meson.source_root(), 'po')
+
+# Desktop launcher and description file.
+custom_target(
+  'desktop-file',
+  input: 'org.gnome.Builder.desktop.in.in',
+  output: 'org.gnome.Builder.desktop',
+  install: true,
+  install_dir: join_paths(get_option('datadir'), 'applications'),
+  command: [msgfmt, '--desktop', '--template', '@INPUT@',
+    '-d', podir, '-o', '@OUTPUT@'],
+)
+
+# Appdata file.
+custom_target(
+  'appdata-file',
+  input: 'org.gnome.Builder.appdata.xml.in',
+  output: 'org.gnome.Builder.appdata.xml',
+  install: true,
+  install_dir: join_paths(get_option('datadir'), 'appdata'),
+  command: [msgfmt, '--xml', '--template', '@INPUT@',
+    '-d', podir, '-o', '@OUTPUT@'],
+)
+
+# D-Bus service file.
+dbusconf = configuration_data()
+dbusconf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
+configure_file(
+       input: 'org.gnome.Builder.service.in',
+       output: 'org.gnome.Builder.service',
+       configuration: dbusconf,
+       install: true,
+       install_dir: join_paths(get_option('datadir'), 'dbus-1', 'services'),
+)
+
+# pkg-config files.
+pkgpkgconfdir = join_paths(get_option('libdir'), 'gnome-builder', 'pkgconfig')
+
+pkgconf = configuration_data()
+pkgconf.set('prefix', get_option('prefix'))
+pkgconf.set('libdir', join_paths('${exec_prefix}', get_option('libdir')))
+pkgconf.set('VERSION', meson.project_version())
+
+# TODO: Use the pkgconfig module to generate these
+
+configure_file(
+       input: 'libide-1.0.pc.in',
+       output: 'libide-1.0.pc',
+       configuration: pkgconf,
+       install: true,
+       install_dir: pkgpkgconfdir,
+)
+
+configure_file(
+       input: 'template-glib-1.0.pc.in',
+       output: 'template-glib-1.0.pc',
+       configuration: pkgconf,
+       install: true,
+       install_dir: pkgpkgconfdir,
+)
+
diff --git a/data/style-schemes/meson.build b/data/style-schemes/meson.build
new file mode 100644
index 0000000..64ea414
--- /dev/null
+++ b/data/style-schemes/meson.build
@@ -0,0 +1,4 @@
+install_data([
+  'builder.xml',
+  'builder-dark.xml',
+], install_dir: join_paths(get_option('datadir'), 'gtksourceview-3.0/styles'))
diff --git a/doc/reference/libide/meson.build b/doc/reference/libide/meson.build
new file mode 100644
index 0000000..0172661
--- /dev/null
+++ b/doc/reference/libide/meson.build
@@ -0,0 +1,38 @@
+if get_option('with_docs')
+
+doc_conf = configuration_data()
+doc_conf.set('LIBIDE_VERSION', libide_api_version)
+
+subdir('xml')
+
+doc_version_xml = configure_file(
+  input: 'version.xml.in',
+  output: 'version.xml',
+  configuration: doc_conf,
+)
+
+glib_prefix = libgio_dep.get_pkgconfig_variable('prefix')
+glib_doc_dir = join_paths(glib_prefix, 'share/gtk-doc/html')
+doc_dir_arg = '--extra-dir=' + glib_doc_dir
+
+gnome.gtkdoc('libide',
+  main_sgml: 'libide-docs.sgml',
+  src_dir: join_paths(meson.source_root(), 'libide'),
+  dependencies: libide_dep,
+  install: true,
+  scan_args: [
+    '--ignore-headers=config.h',
+  ],
+  fixxref_args: [
+    '--html-dir=' + join_paths(get_option('prefix'), get_option('datadir'), 'gtk-doc/html'),
+    join_paths(doc_dir_arg, 'glib'),
+    join_paths(doc_dir_arg, 'gmodule'),
+    join_paths(doc_dir_arg, 'gobject'),
+    join_paths(doc_dir_arg, 'gio'),
+    join_paths(doc_dir_arg, 'gtk'),
+    join_paths(doc_dir_arg, 'gtksourceview-3.0'),
+  ],
+  content_files: 'xml/tree_index.sgml',
+)
+
+endif
diff --git a/doc/reference/libide/xml/gtkdocentities.ent.in b/doc/reference/libide/xml/gtkdocentities.ent.in
new file mode 100644
index 0000000..fd86c16
--- /dev/null
+++ b/doc/reference/libide/xml/gtkdocentities.ent.in
@@ -0,0 +1,7 @@
+<!ENTITY package "@PACKAGE@">
+<!ENTITY package_bugreport "@PACKAGE_BUGREPORT@">
+<!ENTITY package_name "@PACKAGE_NAME@">
+<!ENTITY package_string "@PACKAGE_STRING@">
+<!ENTITY package_tarname "@PACKAGE_TARNAME@">
+<!ENTITY package_url "@PACKAGE_URL@">
+<!ENTITY package_version "@PACKAGE_VERSION@">
diff --git a/doc/reference/libide/xml/meson.build b/doc/reference/libide/xml/meson.build
new file mode 100644
index 0000000..732ee70
--- /dev/null
+++ b/doc/reference/libide/xml/meson.build
@@ -0,0 +1,13 @@
+doc_conf.set('PACKAGE', 'gnome-builder')
+doc_conf.set('PACKAGE_NAME', 'gnome-builder')
+doc_conf.set('PACKAGE_BUGREPORT', 'FIXME')
+doc_conf.set('PACKAGE_STRING', 'gnome-builder')
+doc_conf.set('PACKAGE_TARNAME', 'gnome-builder-' + meson.project_version())
+doc_conf.set('PACKAGE_URL', 'FIXME')
+doc_conf.set('PACKAGE_VERSION', meson.project_version())
+
+configure_file(
+  input: 'gtkdocentities.ent.in',
+  output: 'gtkdocentities.ent',
+  configuration: doc_conf,
+)
diff --git a/doc/reference/libide/xml/tree_index.sgml b/doc/reference/libide/xml/tree_index.sgml
new file mode 100644
index 0000000..eb13996
--- /dev/null
+++ b/doc/reference/libide/xml/tree_index.sgml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!DOCTYPE screen PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd";
+[
+  <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
+  <!ENTITY % gtkdocentities SYSTEM "../xml/gtkdocentities.ent">
+  %gtkdocentities;
+]>
+<screen>
+
+</screen>
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 0000000..9eaac1f
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,9 @@
+if get_option('with_help')
+
+gnome.yelp('gnome-builder',
+   sources: ['index.page', 'introduction.page', 'legal.xml'],
+   media: ['figures/icon.png'],
+   languages: ['cs', 'de', 'el', 'es', 'hu', 'pt_BR', 'sv', 'tr'],
+)
+
+endif
diff --git a/libide/application/ide-application-plugins.c b/libide/application/ide-application-plugins.c
index 1159c15..e41aee4 100644
--- a/libide/application/ide-application-plugins.c
+++ b/libide/application/ide-application-plugins.c
@@ -18,6 +18,8 @@
 
 #define G_LOG_DOMAIN "ide-application"
 
+#include "config.h"
+
 #include <libpeas/peas.h>
 #include <girepository.h>
 
diff --git a/libide/editor/ide-editor-map-bin.c b/libide/editor/ide-editor-map-bin.c
index 8a3592c..6f0adbb 100644
--- a/libide/editor/ide-editor-map-bin.c
+++ b/libide/editor/ide-editor-map-bin.c
@@ -18,6 +18,8 @@
 
 #define G_LOG_DOMAIN "ide-editor-map-bin"
 
+#include "config.h"
+
 #include <glib/gi18n.h>
 #include <pango/pangofc-fontmap.h>
 
diff --git a/libide/editorconfig/ide-editorconfig-file-settings.c 
b/libide/editorconfig/ide-editorconfig-file-settings.c
index 0e1cae2..c6879b1 100644
--- a/libide/editorconfig/ide-editorconfig-file-settings.c
+++ b/libide/editorconfig/ide-editorconfig-file-settings.c
@@ -18,7 +18,7 @@
 
 #define G_LOG_DOMAIN "editorconfig"
 
-#include <editorconfig-glib.h>
+#include "editorconfig-glib.h"
 #include <glib/gi18n.h>
 
 #include "ide-debug.h"
diff --git a/libide/ide.map b/libide/ide.map
new file mode 100644
index 0000000..770c78a
--- /dev/null
+++ b/libide/ide.map
@@ -0,0 +1,7 @@
+{
+global:
+    ide_*;
+    _ide_*;
+local:
+    *;
+};
diff --git a/libide/meson.build b/libide/meson.build
new file mode 100644
index 0000000..a4636f3
--- /dev/null
+++ b/libide/meson.build
@@ -0,0 +1,754 @@
+libide_enum_headers = [
+  'buffers/ide-buffer.h',
+  'buildsystem/ide-build-log.h',
+  'buildsystem/ide-build-pipeline.h',
+  'devices/ide-device.h',
+  'diagnostics/ide-diagnostic.h',
+  'doap/ide-doap.h',
+  'files/ide-indent-style.h',
+  'highlighting/ide-highlighter.h',
+  'runtimes/ide-runtime.h',
+  'sourceview/ide-source-view.h',
+  'symbols/ide-symbol.h',
+  'threading/ide-thread-pool.h',
+  'vcs/ide-vcs-config.h',
+  'workbench/ide-layout-stack-split.h',
+]
+
+libide_header_subdir = 'gnome-builder-' + meson.project_version() + '/libide'
+libide_header_dir = join_paths(get_option('includedir'), libide_header_subdir)
+
+libide_enums = gnome.mkenums('ide-enums',
+  h_template: 'ide-enums.h.in',
+  c_template: 'ide-enums.c.in',
+  sources: libide_enum_headers,
+  install_header: true,
+  install_dir: libide_header_dir,
+)
+
+libide_public_headers = [
+  'ide-context.h',
+  'ide-global.h',
+  'ide-macros.h',
+  'ide-object.h',
+  'ide-service.h',
+  'ide-types.h',
+  'ide.h',
+  'application/ide-application-addin.h',
+  'application/ide-application-credits.h',
+  'application/ide-application-tool.h',
+  'application/ide-application.h',
+  'buffers/ide-buffer-change-monitor.h',
+  'buffers/ide-buffer-manager.h',
+  'buffers/ide-buffer.h',
+  'buffers/ide-unsaved-file.h',
+  'buffers/ide-unsaved-files.h',
+  'buildconfig/ide-buildconfig-configuration.h',
+  'buildconfig/ide-buildconfig-configuration-provider.h',
+  'buildsystem/ide-build-log.h',
+  'buildsystem/ide-build-manager.h',
+  'buildsystem/ide-build-pipeline.h',
+  'buildsystem/ide-build-pipeline-addin.h',
+  'buildsystem/ide-build-stage.h',
+  'buildsystem/ide-build-stage-launcher.h',
+  'buildsystem/ide-build-stage-mkdirs.h',
+  'buildsystem/ide-build-stage-transfer.h',
+  'buildsystem/ide-build-system.h',
+  'buildsystem/ide-build-target.h',
+  'buildsystem/ide-build-utils.h',
+  'buildsystem/ide-configuration-manager.h',
+  'buildsystem/ide-configuration.h',
+  'buildsystem/ide-configuration-provider.h',
+  'buildsystem/ide-environment-variable.h',
+  'buildsystem/ide-environment.h',
+  'devices/ide-device-manager.h',
+  'devices/ide-device-provider.h',
+  'devices/ide-device.h',
+  'diagnostics/ide-diagnostic-provider.h',
+  'diagnostics/ide-diagnostic.h',
+  'diagnostics/ide-diagnostics-manager.h',
+  'diagnostics/ide-diagnostics.h',
+  'diagnostics/ide-fixit.h',
+  'diagnostics/ide-source-location.h',
+  'diagnostics/ide-source-range.h',
+  'directory/ide-directory-build-system.h',
+  'directory/ide-directory-vcs.h',
+  'doap/ide-doap-person.h',
+  'doap/ide-doap.h',
+  'editor/ide-editor-perspective.h',
+  'editor/ide-editor-view-addin.h',
+  'editor/ide-editor-view.h',
+  'files/ide-file-settings.h',
+  'files/ide-file.h',
+  'files/ide-indent-style.h',
+  'genesis/ide-genesis-addin.h',
+  'highlighting/ide-highlight-engine.h',
+  'highlighting/ide-highlight-index.h',
+  'highlighting/ide-highlighter.h',
+  'history/ide-back-forward-item.h',
+  'history/ide-back-forward-list.h',
+  'langserv/ide-langserv-client.h',
+  'langserv/ide-langserv-completion-provider.h',
+  'langserv/ide-langserv-diagnostic-provider.h',
+  'langserv/ide-langserv-highlighter.h',
+  'langserv/ide-langserv-rename-provider.h',
+  'langserv/ide-langserv-symbol-node.h',
+  'langserv/ide-langserv-symbol-resolver.h',
+  'langserv/ide-langserv-symbol-tree.h',
+  'local/ide-local-device.h',
+  'logging/ide-log.h',
+  'plugins/ide-extension-adapter.h',
+  'plugins/ide-extension-set-adapter.h',
+  'preferences/ide-preferences-addin.h',
+  'preferences/ide-preferences-bin.h',
+  'preferences/ide-preferences-entry.h',
+  'preferences/ide-preferences-file-chooser-button.h',
+  'preferences/ide-preferences-flow-box.h',
+  'preferences/ide-preferences-font-button.h',
+  'preferences/ide-preferences-group.h',
+  'preferences/ide-preferences-page.h',
+  'preferences/ide-preferences-spin-button.h',
+  'preferences/ide-preferences-switch.h',
+  'preferences/ide-preferences.h',
+  'projects/ide-project-edit.h',
+  'projects/ide-project-file.h',
+  'projects/ide-project-files.h',
+  'projects/ide-project-info.h',
+  'projects/ide-project-item.h',
+  'projects/ide-project-miner.h',
+  'projects/ide-project.h',
+  'projects/ide-recent-projects.h',
+  'rename/ide-rename-provider.h',
+  'runner/ide-run-button.h',
+  'runner/ide-run-manager.h',
+  'runner/ide-runner.h',
+  'runner/ide-runner-addin.h',
+  'runtimes/ide-runtime-manager.h',
+  'runtimes/ide-runtime-provider.h',
+  'runtimes/ide-runtime.h',
+  'search/ide-omni-search-display.h',
+  'search/ide-omni-search-entry.h',
+  'search/ide-omni-search-group.h',
+  'search/ide-omni-search-row.h',
+  'search/ide-pattern-spec.h',
+  'search/ide-search-context.h',
+  'search/ide-search-engine.h',
+  'search/ide-search-provider.h',
+  'search/ide-search-reducer.h',
+  'search/ide-search-result.h',
+  'snippets/ide-source-snippet-chunk.h',
+  'snippets/ide-source-snippet-context.h',
+  'snippets/ide-source-snippet.h',
+  'snippets/ide-source-snippets-manager.h',
+  'snippets/ide-source-snippets.h',
+  'sourceview/ide-completion-item.h',
+  'sourceview/ide-completion-provider.h',
+  'sourceview/ide-completion-results.h',
+  'sourceview/ide-completion-words.h',
+  'sourceview/ide-indenter.h',
+  'sourceview/ide-language.h',
+  'sourceview/ide-source-map.h',
+  'sourceview/ide-source-style-scheme.h',
+  'sourceview/ide-source-view-mode.h',
+  'sourceview/ide-source-view.h',
+  'subprocess/ide-subprocess.h',
+  'subprocess/ide-subprocess-launcher.h',
+  'subprocess/ide-subprocess-supervisor.h',
+  'symbols/ide-symbol-node.h',
+  'symbols/ide-symbol-resolver.h',
+  'symbols/ide-symbol-tree.h',
+  'symbols/ide-symbol.h',
+  'symbols/ide-tags-builder.h',
+  'template/ide-project-template.h',
+  'template/ide-template-base.h',
+  'template/ide-template-provider.h',
+  'threading/ide-thread-pool.h',
+  'transfers/ide-transfer-manager.h',
+  'transfers/ide-transfer-row.h',
+  'transfers/ide-transfer.h',
+  'transfers/ide-transfer-button.h',
+  'transfers/ide-transfers-button.h',
+  'transfers/ide-transfers-progress-icon.h',
+  'tree/ide-tree-builder.h',
+  'tree/ide-tree-node.h',
+  'tree/ide-tree-types.h',
+  'tree/ide-tree.h',
+  'util/ide-cairo.h',
+  'util/ide-dnd.h',
+  'util/ide-directory-reaper.h',
+  'util/ide-file-manager.h',
+  'util/ide-flatpak.h',
+  'util/ide-glib.h',
+  'util/ide-gtk.h',
+  'util/ide-line-reader.h',
+  'util/ide-list-inline.h',
+  'util/ide-pango.h',
+  'util/ide-posix.h',
+  'util/ide-progress.h',
+  'util/ide-rgba.h',
+  'util/ide-settings.h',
+  'util/ide-uri.h',
+  'vcs/ide-vcs-config.h',
+  'vcs/ide-vcs-initializer.h',
+  'vcs/ide-vcs-uri.h',
+  'vcs/ide-vcs.h',
+  'workbench/ide-layout-grid.h',
+  'workbench/ide-layout-pane.h',
+  'workbench/ide-layout-stack-split.h',
+  'workbench/ide-layout-stack.h',
+  'workbench/ide-layout-stack-addin.h',
+  'workbench/ide-layout-view.h',
+  'workbench/ide-layout.h',
+  'workbench/ide-omni-bar.h',
+  'workbench/ide-perspective.h',
+  'workbench/ide-workbench-addin.h',
+  'workbench/ide-workbench-header-bar.h',
+  'workbench/ide-workbench.h',
+  'workers/ide-worker.h',
+]
+
+libide_conf = configuration_data()
+libide_conf.set10('ENABLE_TRACING', get_option('enable_tracing'))
+libide_conf.set('BUGREPORT_URL', 'https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-builder')
+libide_debug_h = configure_file(
+  input: 'ide-debug.h.in',
+  output: 'ide-debug.h',
+  configuration: libide_conf,
+  install: true,
+  install_dir: libide_header_dir,
+)
+
+# TODO: This is ugly and should be handled upstream
+foreach header: libide_public_headers
+  header_split = header.split('/')
+  if header_split.length() == 2
+    header_path = join_paths(libide_header_subdir, header_split[0])
+    install_headers(header, subdir: header_path)
+  else
+    install_headers(header, subdir: libide_header_subdir)
+  endif
+endforeach
+
+subdir('resources')
+
+libide_icons_resources = gnome.compile_resources('ide-icons-resources',
+  join_paths(meson.source_root(), 'data/icons/hicolor/icons.gresource.xml'),
+  source_dir: join_paths(meson.source_root(), 'data/icons/hicolor'),
+  c_name: 'ide_icons',
+)
+
+libide_public_sources = [
+  'application/ide-application-addin.c',
+  'application/ide-application-tool.c',
+  'application/ide-application.c',
+  'application/ide-application-open.c',
+  'buffers/ide-buffer-change-monitor.c',
+  'buffers/ide-buffer-manager.c',
+  'buffers/ide-buffer.c',
+  'buffers/ide-unsaved-file.c',
+  'buffers/ide-unsaved-files.c',
+  'buildconfig/ide-buildconfig-configuration.c',
+  'buildconfig/ide-buildconfig-configuration-provider.c',
+  'buildsystem/ide-build-manager.c',
+  'buildsystem/ide-build-pipeline.c',
+  'buildsystem/ide-build-pipeline-addin.c',
+  'buildsystem/ide-build-stage.c',
+  'buildsystem/ide-build-stage-launcher.c',
+  'buildsystem/ide-build-stage-mkdirs.c',
+  'buildsystem/ide-build-stage-transfer.c',
+  'buildsystem/ide-build-system.c',
+  'buildsystem/ide-build-target.c',
+  'buildsystem/ide-build-utils.c',
+  'buildsystem/ide-configuration-manager.c',
+  'buildsystem/ide-configuration.c',
+  'buildsystem/ide-configuration-provider.c',
+  'buildsystem/ide-environment-variable.c',
+  'buildsystem/ide-environment.c',
+  'devices/ide-device-manager.c',
+  'devices/ide-device-provider.c',
+  'devices/ide-device.c',
+  'diagnostics/ide-diagnostic-provider.c',
+  'diagnostics/ide-diagnostic.c',
+  'diagnostics/ide-diagnostics-manager.c',
+  'diagnostics/ide-diagnostics.c',
+  'diagnostics/ide-fixit.c',
+  'diagnostics/ide-source-location.c',
+  'diagnostics/ide-source-range.c',
+  'directory/ide-directory-build-system.c',
+  'directory/ide-directory-plugin.c',
+  'directory/ide-directory-vcs.c',
+  'doap/ide-doap-person.c',
+  'doap/ide-doap.c',
+  'editor/ide-editor-perspective.c',
+  'editor/ide-editor-view-addin.c',
+  'editor/ide-editor-view.c',
+  'files/ide-file-settings.c',
+  'files/ide-file.c',
+  'genesis/ide-genesis-addin.c',
+  'highlighting/ide-highlight-engine.c',
+  'highlighting/ide-highlight-index.c',
+  'highlighting/ide-highlighter.c',
+  'history/ide-back-forward-item.c',
+  'history/ide-back-forward-list-load.c',
+  'history/ide-back-forward-list-save.c',
+  'history/ide-back-forward-list.c',
+  'ide-context.c',
+  'ide-object.c',
+  'ide-service.c',
+  'ide.c',
+  'langserv/ide-langserv-client.c',
+  'langserv/ide-langserv-completion-provider.c',
+  'langserv/ide-langserv-diagnostic-provider.c',
+  'langserv/ide-langserv-highlighter.c',
+  'langserv/ide-langserv-rename-provider.c',
+  'langserv/ide-langserv-symbol-node.c',
+  'langserv/ide-langserv-symbol-node-private.h',
+  'langserv/ide-langserv-symbol-resolver.c',
+  'langserv/ide-langserv-symbol-tree.c',
+  'langserv/ide-langserv-symbol-tree-private.h',
+  'local/ide-local-device.c',
+  'logging/ide-log.c',
+  'plugins/ide-extension-adapter.c',
+  'plugins/ide-extension-set-adapter.c',
+  'preferences/ide-preferences-addin.c',
+  'preferences/ide-preferences-entry.c',
+  'preferences/ide-preferences-file-chooser-button.c',
+  'preferences/ide-preferences-flow-box.c',
+  'preferences/ide-preferences-font-button.c',
+  'preferences/ide-preferences-group.c',
+  'preferences/ide-preferences-page.c',
+  'preferences/ide-preferences-spin-button.c',
+  'preferences/ide-preferences-switch.c',
+  'preferences/ide-preferences.c',
+  'projects/ide-project-edit.c',
+  'projects/ide-project-file.c',
+  'projects/ide-project-files.c',
+  'projects/ide-project-info.c',
+  'projects/ide-project-item.c',
+  'projects/ide-project-miner.c',
+  'projects/ide-project.c',
+  'projects/ide-recent-projects.c',
+  'rename/ide-rename-provider.c',
+  'runner/ide-run-button.c',
+  'runner/ide-run-manager.c',
+  'runner/ide-runner.c',
+  'runner/ide-runner-addin.c',
+  'runtimes/ide-runtime-manager.c',
+  'runtimes/ide-runtime-provider.c',
+  'runtimes/ide-runtime.c',
+  'search/ide-omni-search-display.c',
+  'search/ide-omni-search-entry.c',
+  'search/ide-omni-search-group.c',
+  'search/ide-omni-search-row.c',
+  'search/ide-pattern-spec.c',
+  'search/ide-search-context.c',
+  'search/ide-search-engine.c',
+  'search/ide-search-provider.c',
+  'search/ide-search-result.c',
+  'snippets/ide-source-snippet-chunk.c',
+  'snippets/ide-source-snippet-context.c',
+  'snippets/ide-source-snippet.c',
+  'snippets/ide-source-snippets-manager.c',
+  'snippets/ide-source-snippets.c',
+  'sourceview/ide-completion-item.c',
+  'sourceview/ide-completion-provider.c',
+  'sourceview/ide-completion-results.c',
+  'sourceview/ide-completion-words.c',
+  'sourceview/ide-indenter.c',
+  'sourceview/ide-language.c',
+  'sourceview/ide-source-map.c',
+  'sourceview/ide-source-style-scheme.c',
+  'sourceview/ide-source-view-mode.c',
+  'sourceview/ide-source-view.c',
+  'subprocess/ide-subprocess.c',
+  'subprocess/ide-subprocess-launcher.c',
+  'subprocess/ide-subprocess-supervisor.c',
+  'symbols/ide-symbol-node.c',
+  'symbols/ide-symbol-resolver.c',
+  'symbols/ide-symbol-tree.c',
+  'symbols/ide-symbol.c',
+  'symbols/ide-tags-builder.c',
+  'template/ide-project-template.c',
+  'template/ide-template-base.c',
+  'template/ide-template-provider.c',
+  'threading/ide-thread-pool.c',
+  'transfers/ide-transfer-manager.c',
+  'transfers/ide-transfer-row.c',
+  'transfers/ide-transfer.c',
+  'transfers/ide-transfer-button.c',
+  'transfers/ide-transfers-button.c',
+  'transfers/ide-transfers-progress-icon.c',
+  'tree/ide-tree-builder.c',
+  'tree/ide-tree-node.c',
+  'tree/ide-tree.c',
+  'util/ide-cairo.c',
+  'util/ide-dnd.c',
+  'util/ide-directory-reaper.c',
+  'util/ide-file-manager.c',
+  'util/ide-flatpak.c',
+  'util/ide-glib.c',
+  'util/ide-gtk.c',
+  'util/ide-line-reader.c',
+  'util/ide-pango.c',
+  'util/ide-posix.c',
+  'util/ide-progress.c',
+  'util/ide-rgba.c',
+  'util/ide-settings.c',
+  'util/ide-uri.c',
+  'vcs/ide-vcs-config.c',
+  'vcs/ide-vcs-initializer.c',
+  'vcs/ide-vcs-uri.c',
+  'vcs/ide-vcs.c',
+  'workbench/ide-layout-grid.c',
+  'workbench/ide-layout-pane.c',
+  'workbench/ide-layout-stack.c',
+  'workbench/ide-layout-stack-addin.c',
+  'workbench/ide-layout-view.c',
+  'workbench/ide-layout.c',
+  'workbench/ide-omni-bar.c',
+  'workbench/ide-perspective.c',
+  'workbench/ide-workbench-addin.c',
+  'workbench/ide-workbench-header-bar.c',
+  'workbench/ide-workbench-open.c',
+  'workbench/ide-workbench.c',
+  'workers/ide-worker.c',
+  libide_enums[0],
+]
+
+libide_generated_headers = [
+  libide_resources[1],
+  libide_icons_resources[1],
+  libide_enums[1],
+  libide_debug_h,
+]
+
+libide_args = []
+# TODO
+#libide_vcs_version = vcs_tag(
+#  input: 'ide-vcs-version.h.in',
+#  output: 'ide-vcs-version.h',
+#  command: '../build/meson/meson_vcs_tag.sh',
+#  fallback: '',
+#)
+
+libide_sources = libide_generated_headers + libide_public_sources + [
+  'application/ide-application-actions.c',
+  'application/ide-application-actions.h',
+  'application/ide-application-command-line.c',
+  'application/ide-application-plugins.c',
+  'application/ide-application-private.h',
+  'application/ide-application-tests.c',
+  'application/ide-application-tests.h',
+  'buildconfig/ide-buildconfig-plugin.c',
+  'buildconfig/ide-buildconfig-pipeline-addin.c',
+  'buildconfig/ide-buildconfig-pipeline-addin.h',
+  'buildsystem/ide-build-log.c',
+  'buildsystem/ide-build-log-private.h',
+  'buildsystem/ide-build-stage-private.h',
+  'buildui/ide-build-configuration-row.c',
+  'buildui/ide-build-configuration-row.h',
+  'buildui/ide-build-configuration-view.c',
+  'buildui/ide-build-configuration-view.h',
+  'buildui/ide-build-log-panel.c',
+  'buildui/ide-build-log-panel.h',
+  'buildui/ide-build-panel.c',
+  'buildui/ide-build-panel.h',
+  'buildui/ide-build-perspective.c',
+  'buildui/ide-build-perspective.h',
+  'buildui/ide-build-plugin.c',
+  'buildui/ide-build-tool.c',
+  'buildui/ide-build-tool.h',
+  'buildui/ide-build-workbench-addin.c',
+  'buildui/ide-build-workbench-addin.h',
+  'buildui/ide-environment-editor-row.c',
+  'buildui/ide-environment-editor-row.h',
+  'buildui/ide-environment-editor.c',
+  'buildui/ide-environment-editor.h',
+  'editor/ide-editor-frame-actions.c',
+  'editor/ide-editor-frame-actions.h',
+  'editor/ide-editor-frame-private.h',
+  'editor/ide-editor-frame.c',
+  'editor/ide-editor-frame.h',
+  'editor/ide-editor-map-bin.c',
+  'editor/ide-editor-map-bin.h',
+  'editor/ide-editor-plugin.c',
+  'editor/ide-editor-layout-stack-addin.c',
+  'editor/ide-editor-layout-stack-addin.h',
+  'editor/ide-editor-layout-stack-controls.c',
+  'editor/ide-editor-layout-stack-controls.h',
+  'editor/ide-editor-print-operation.c',
+  'editor/ide-editor-print-operation.h',
+  'editor/ide-editor-spell-navigator.c',
+  'editor/ide-editor-spell-navigator.h',
+  'editor/ide-editor-spell-utils.c',
+  'editor/ide-editor-spell-utils.h',
+  'editor/ide-editor-spell-dict.c',
+  'editor/ide-editor-spell-dict.h',
+  'editor/ide-editor-spell-language-popover.c',
+  'editor/ide-editor-spell-language-popover.h',
+  'editor/ide-editor-spell-widget.c',
+  'editor/ide-editor-spell-widget.h',
+  'editor/ide-editor-tweak-widget.c',
+  'editor/ide-editor-tweak-widget.h',
+  'editor/ide-editor-view-actions.c',
+  'editor/ide-editor-view-actions.h',
+  'editor/ide-editor-view-addin-private.h',
+  'editor/ide-editor-view-private.h',
+  'editor/ide-editor-workbench-addin.c',
+  'editor/ide-editor-workbench-addin.h',
+  'gconstructor.h',
+  'greeter/ide-greeter-perspective.c',
+  'greeter/ide-greeter-perspective.h',
+  'greeter/ide-greeter-project-row.c',
+  'greeter/ide-greeter-project-row.h',
+  'gsettings/ide-gsettings-file-settings.c',
+  'gsettings/ide-gsettings-file-settings.h',
+  'gsettings/ide-language-defaults.c',
+  'gsettings/ide-language-defaults.h',
+  'history/ide-back-forward-list-private.h',
+  'ide-internal.h',
+  'keybindings/ide-keybindings.c',
+  'keybindings/ide-keybindings.h',
+  'keybindings/ide-shortcuts-window.c',
+  'keybindings/ide-shortcuts-window.h',
+  'modelines/ide-modelines-file-settings.c',
+  'modelines/ide-modelines-file-settings.h',
+  'modelines/modeline-parser.c',
+  'modelines/modeline-parser.h',
+  'plugins/ide-extension-util.c',
+  'plugins/ide-extension-util.h',
+  'projects/ide-project-edit-private.h',
+  'preferences/ide-preferences-bin-private.h',
+  'preferences/ide-preferences-bin.c',
+  'preferences/ide-preferences-builtin.c',
+  'preferences/ide-preferences-builtin.h',
+  'preferences/ide-preferences-group-private.h',
+  'preferences/ide-preferences-language-row.c',
+  'preferences/ide-preferences-language-row.h',
+  'preferences/ide-preferences-page-private.h',
+  'preferences/ide-preferences-perspective.c',
+  'preferences/ide-preferences-perspective.h',
+  'runner/ide-run-manager-private.h',
+  'search/ide-search-reducer.c',
+  'snippets/ide-source-snippet-completion-item.c',
+  'snippets/ide-source-snippet-completion-item.h',
+  'snippets/ide-source-snippet-completion-provider.c',
+  'snippets/ide-source-snippet-completion-provider.h',
+  'snippets/ide-source-snippet-parser.c',
+  'snippets/ide-source-snippet-parser.h',
+  'snippets/ide-source-snippet-private.h',
+  'sourceview/ide-line-change-gutter-renderer.c',
+  'sourceview/ide-line-change-gutter-renderer.h',
+  'sourceview/ide-line-diagnostics-gutter-renderer.c',
+  'sourceview/ide-line-diagnostics-gutter-renderer.h',
+  'sourceview/ide-source-iter.c',
+  'sourceview/ide-source-iter.h',
+  'sourceview/ide-source-view-capture.c',
+  'sourceview/ide-source-view-capture.h',
+  'sourceview/ide-source-view-movements.c',
+  'sourceview/ide-source-view-movements.h',
+  'sourceview/ide-text-iter.c',
+  'sourceview/ide-text-iter.h',
+  'sourceview/ide-text-util.c',
+  'sourceview/ide-text-util.h',
+  'subprocess/ide-breakout-subprocess.c',
+  'subprocess/ide-breakout-subprocess.h',
+  'subprocess/ide-breakout-subprocess-private.h',
+  'subprocess/ide-simple-subprocess.c',
+  'subprocess/ide-simple-subprocess.h',
+  'theatrics/ide-box-theatric.c',
+  'theatrics/ide-box-theatric.h',
+  'theming/ide-css-provider.c',
+  'theming/ide-css-provider.h',
+  'theming/ide-theme-manager.c',
+  'theming/ide-theme-manager.h',
+  'tree/ide-tree-private.h',
+  'util/ide-async-helper.c',
+  'util/ide-async-helper.h',
+  'util/ide-battery-monitor.c',
+  'util/ide-battery-monitor.h',
+  'util/ide-doc-seq.c',
+  'util/ide-doc-seq.h',
+  'util/ide-gdk.c',
+  'util/ide-gdk.h',
+  'util/ide-ref-ptr.c',
+  'util/ide-ref-ptr.h',
+  'util/ide-window-settings.c',
+  'util/ide-window-settings.h',
+  'workbench/ide-layout-stack-actions.c',
+  'workbench/ide-layout-stack-actions.h',
+  'workbench/ide-layout-stack-private.h',
+  'workbench/ide-layout-tab-bar.c',
+  'workbench/ide-layout-tab-bar.h',
+  'workbench/ide-layout-tab-bar-private.h',
+  'workbench/ide-layout-tab.c',
+  'workbench/ide-layout-tab.h',
+  'workbench/ide-layout-tab-private.h',
+  'workbench/ide-omni-bar-row.c',
+  'workbench/ide-omni-bar-row.h',
+  'workbench/ide-perspective-menu-button.c',
+  'workbench/ide-perspective-menu-button.h',
+  'workbench/ide-workbench-actions.c',
+  'workbench/ide-workbench-private.h',
+  'workers/ide-worker-manager.c',
+  'workers/ide-worker-manager.h',
+  'workers/ide-worker-process.c',
+  'workers/ide-worker-process.h',
+]
+
+libgtksource_dep = dependency('gtksourceview-3.0', version: '>= 3.22.0')
+
+libide_deps = [
+  dependency('gio-unix-2.0'),
+  dependency('pangoft2', version: '>= 1.38.0'),
+  dependency('gspell-1', version: '>= 1.2.0'),
+  dependency('enchant'),
+  libgtksource_dep,
+  libgio_dep,
+  libgtk_dep,
+  libpeas_dep,
+  libegg_dep,
+  libpnl_dep,
+  libtmpl_dep,
+  libxml_dep,
+  libsearch_dep,
+  libgd_dep,
+  libnautilus_dep,
+  libjson_glib_dep,
+  libjsonrpc_dep,
+]
+
+contrib_dir = join_paths(meson.source_root(), 'contrib/')
+
+if get_option('with_webkit')
+  libide_sources += ['webkit/ide-webkit.c']
+  libide_deps += [dependency('webkit2gtk-4.0', version: '>=2.12.0')]
+endif
+
+if get_option('with_editorconfig')
+  libide_args += '-DENABLE_EDITORCONFIG'
+  libide_deps += libeditorconfig_dep
+  libide_sources += [
+    'editorconfig/editorconfig-glib.c',
+    'editorconfig/ide-editorconfig-file-settings.c',
+  ]
+endif
+
+libide_api_version = '1.0'
+
+# We want to find the subdirectory to install our override into:
+python3 = find_program('python3')
+
+get_overridedir = '''
+import os
+import sysconfig
+
+libdir = sysconfig.get_config_var('LIBDIR')
+if not libdir:
+  libdir = '/usr/lib'
+
+try:
+  import gi
+  overridedir = gi._overridesdir
+except ImportError:
+  purelibdir = sysconfig.get_path('purelib')
+  overridedir = os.path.join(purelibdir, 'gi', 'overrides')
+
+if overridedir.startswith(libdir): # Should always be True..
+  overridedir = overridedir[len(libdir) + 1:]
+
+print(overridedir)
+'''
+
+ret = run_command([python3, '-c', get_overridedir])
+if ret.returncode() != 0
+  error('Failed to determine pygobject overridedir')
+else
+  pygobject_override_dir = join_paths(get_option('libdir'), ret.stdout().strip())
+endif
+
+install_data('Ide.py', install_dir: pygobject_override_dir)
+
+libide = shared_library('ide-' + libide_api_version,
+  libide_resources + libide_icons_resources + libide_sources,
+  dependencies: libide_deps,
+  link_depends: 'ide.map',
+  c_args: libide_args,
+  link_args: [
+    '-Wl,--version-script,' + join_paths(meson.current_source_dir(), 'ide.map'),
+  ],
+  install: true,
+  install_dir: pkglibdir,
+)
+
+libide_dep = declare_dependency(
+  sources: libide_generated_headers,
+  dependencies: [
+    libgio_dep,
+    libgtk_dep,
+    libgtksource_dep,
+    libpnl_dep,
+    libegg_dep,
+    libjson_glib_dep,
+  ],
+  link_with: libide,
+  include_directories: include_directories('.'),
+)
+
+# Doesn't link to libide
+libide_plugin_dep = declare_dependency(
+  sources: libide_generated_headers,
+  dependencies: [
+    libgio_dep,
+    libgtk_dep,
+    libgtksource_dep,
+    libpnl_dep,
+    libegg_dep,
+    libjson_glib_dep,
+  ],
+  include_directories: include_directories('.'),
+)
+
+if get_option('with_introspection')
+
+  libide_gir = gnome.generate_gir(libide,
+    sources: libide_generated_headers + libide_public_headers + libide_public_sources,
+    nsversion: libide_api_version,
+    namespace: 'Ide',
+    symbol_prefix: 'ide',
+    identifier_prefix: 'Ide',
+    link_with: [
+      libegg, libtmpl,
+    ],
+    includes: [
+      libegg_gir[0], 'Gio-2.0', 'GtkSource-3.0',
+      'Peas-1.0', libpnl_gir[0], libtmpl_gir[0],
+      'Json-1.0'],
+    install: true,
+    install_dir_gir: pkggirdir,
+    install_dir_typelib: pkgtypelibdir,
+    extra_args: [
+      '--c-include=ide.h',
+    ]
+  )
+
+  if get_option('with_vapi')
+
+    libide_vapi = gnome.generate_vapi('libide-' + libide_api_version,
+      sources: libide_gir[0],
+      packages: [
+        'gio-2.0',
+        'gtk+-3.0',
+        'gtksourceview-3.0',
+        'libpeas-1.0',
+        'json-glib-1.0',
+        libpnl_vapi,
+        libegg_vapi,
+        libtmpl_vapi,
+      ],
+      install: true,
+      install_dir: pkgvapidir,
+    )
+
+  endif
+endif
diff --git a/libide/resources/meson.build b/libide/resources/meson.build
new file mode 100644
index 0000000..2b8b1de
--- /dev/null
+++ b/libide/resources/meson.build
@@ -0,0 +1,5 @@
+libide_resources = gnome.compile_resources('ide-resources',
+  'libide.gresource.xml',
+  c_name: 'ide',
+)
+
diff --git a/libide/workers/ide-worker-manager.c b/libide/workers/ide-worker-manager.c
index e202d74..68deebd 100644
--- a/libide/workers/ide-worker-manager.c
+++ b/libide/workers/ide-worker-manager.c
@@ -18,6 +18,8 @@
 
 #define G_LOG_DOMAIN "ide-worker-manager"
 
+#include "config.h"
+
 #include <egg-counter.h>
 #include <gio/gio.h>
 #include <gio/gunixsocketaddress.h>
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..4832112
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,195 @@
+project('gnome-builder', 'c',
+  license: 'GPL3+',
+  version: '3.23.90',
+  meson_version: '>= 0.37.0',
+  default_options: [
+    'c_std=gnu11',
+    'cpp_std=c++11',
+    'warning_level=2',
+  ],
+)
+
+version_split = meson.project_version().split('.')
+MAJOR_VERSION = version_split[0]
+MINOR_VERSION = version_split[1]
+MICRO_VERSION = version_split[2]
+
+conf = configuration_data()
+conf.set_quoted('PACKAGE_NAME', 'gnome-builder')
+conf.set_quoted('PACKAGE_VERSION', meson.project_version())
+conf.set_quoted('PACKAGE_STRING', 'gnome-builder-' + meson.project_version())
+conf.set_quoted('PACKAGE_DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
+conf.set_quoted('PACKAGE_LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))
+conf.set_quoted('PACKAGE_LOCALE_DIR', join_paths(get_option('prefix'), get_option('datadir'), 'locale'))
+conf.set_quoted('PACKAGE_LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir')))
+
+conf.set('GETTEXT_PACKAGE', 'PACKAGE_NAME')
+conf.set('LOCALEDIR', 'PACKAGE_LOCALE_DIR')
+
+conf.set10('ENABLE_NLS', true) # Always enabled
+
+# We should probably avoid using these
+conf.set_quoted('SRCDIR', meson.source_root())
+conf.set_quoted('BUILDDIR', meson.build_root())
+
+add_global_arguments([
+  '-DHAVE_CONFIG_H',
+  '-I' + meson.build_root(), # config.h
+  '-D_GNU_SOURCE',
+], language: 'c')
+
+cc = meson.get_compiler('c')
+global_c_args = []
+test_c_args = [
+  '-Wcast-align',
+  '-Wdeclaration-after-statement',
+  ['-Werror=format-security', '-Werror=format=2'],
+  '-Wformat-nonliteral',
+  '-Wformat-security',
+  '-Wmissing-include-dirs',
+  '-Wnested-externs',
+  '-Wno-missing-field-initializers',
+  '-Wno-sign-compare',
+  '-Wno-strict-aliasing',
+  '-Wno-uninitialized',
+  '-Wno-unused-parameter',
+  '-Wpointer-arith',
+  '-Wredundant-decls',
+  '-Wshadow',
+  '-Wswitch-default',
+  '-Wswitch-enum',
+  '-Wundef',
+]
+if get_option('buildtype') != 'plain'
+  test_c_args += '-fstack-protector-strong'
+endif
+if get_option('enable_profiling')
+  test_c_args += '-pg'
+endif
+
+foreach arg: test_c_args
+  if cc.has_multi_arguments(arg)
+    global_c_args += arg
+  endif
+endforeach
+add_project_arguments(
+  global_c_args,
+  language: 'c'
+)
+
+global_link_args = []
+test_link_args = [
+  '-Wl,-z,relro',
+  '-Wl,-z,now',
+]
+if not get_option('buildtype').startswith('debug')
+
+  # TODO: Maybe reuse 'b_ndebug' option
+  add_global_arguments([
+    '-DG_DISABLE_CAST_CHECKS',
+    '-DG_DISABLE_ASSERT',
+    '-DG_DISABLE_CHECKS',
+  ], language: 'c')
+
+  test_link_args += [
+    '-Wl,-Bsymbolic',
+    '-fno-plt',
+  ]
+
+endif
+
+foreach arg: test_link_args
+  if cc.has_argument(arg)
+    global_link_args += arg
+  endif
+endforeach
+add_project_link_arguments(
+  global_link_args,
+  language: 'c'
+)
+
+if cc.has_function('sched_getcpu')
+  conf.set('HAVE_SCHED_GETCPU', true)
+endif
+
+configure_file(
+  input: 'config.h.meson',
+  output: 'config.h',
+  configuration: conf
+)
+
+# Commonly used deps
+libgio_dep = dependency('gio-2.0', version: '>= 2.50.0')
+libgtk_dep = dependency('gtk+-3.0', version: '>= 3.22.1')
+libpeas_dep = dependency('libpeas-1.0', version: '>= 1.18.0')
+libm_dep = cc.find_library('m', required: false)
+libjson_glib_dep = dependency('json-glib-1.0', version: '>= 1.2.0')
+
+
+pkglibdir_abs = join_paths(get_option('prefix'), get_option('libdir'), 'gnome-builder')
+pkglibdir = join_paths(get_option('libdir'), 'gnome-builder')
+pkggirdir = join_paths(get_option('datadir'),'gnome-builder', 'gir-1.0')
+pkgtypelibdir = join_paths(get_option('libdir'), 'gnome-builder', 'girepository-1.0')
+pkgvapidir = join_paths(get_option('datadir'), 'gnome-builder/vapi')
+gnome = import('gnome')
+
+subdir('data')
+subdir('data/fonts')
+subdir('data/gsettings')
+subdir('data/icons')
+subdir('data/style-schemes')
+subdir('contrib/egg')
+subdir('contrib/gd')
+subdir('contrib/jsonrpc-glib')
+subdir('contrib/libeditorconfig')
+subdir('contrib/nautilus')
+subdir('contrib/pnl')
+subdir('contrib/rg')
+subdir('contrib/search')
+subdir('contrib/tmpl')
+subdir('contrib/xml')
+subdir('contrib/gstyle') # Depends on libsearch/libxml
+subdir('libide')
+subdir('doc/reference/libide')
+subdir('help')
+subdir('plugins')
+subdir('po')
+subdir('tests')
+subdir('tools')
+
+exe_link_args = [
+  '-pie',
+]
+exe_c_args = [
+  '-fPIE',
+]
+
+executable('gnome-builder', 'src/main.c',
+  gui_app: true,
+  install: true,
+  c_args: exe_c_args,
+  link_args: exe_link_args,
+  install_rpath: pkglibdir_abs,
+  dependencies: libide_deps + [libide_dep],
+)
+
+executable('gnome-builder-cli', 'src/main.c',
+  gui_app: false,
+  install: true,
+  c_args: exe_c_args,
+  link_args: exe_link_args,
+  install_rpath: pkglibdir_abs,
+  dependencies: libide_deps + [libide_dep],
+)
+
+executable('gnome-builder-worker', 'src/main.c',
+  gui_app: false,
+  install: true,
+  install_dir: get_option('libexecdir'),
+  c_args: exe_c_args,
+  link_args: exe_link_args,
+  install_rpath: pkglibdir_abs,
+  dependencies: libide_deps + [libide_dep],
+)
+
+meson.add_install_script('build/meson/meson_post_install.py')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..6089c2c
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,59 @@
+# TODO: Add descriptions to all of these
+option('enable_tracing', type: 'boolean', value: false)
+option('enable_profiling', type: 'boolean', value: false)
+option('enable_rdtscp', type: 'boolean', value: false,
+  description: 'High performance counters'
+)
+
+option('with_editorconfig', type: 'boolean')
+option('with_webkit', type: 'boolean')
+option('with_introspection', type: 'boolean')
+option('with_vapi', type: 'boolean')
+option('with_help', type: 'boolean')
+option('with_docs', type: 'boolean')
+
+# Plugins
+# Ideally we want many of these to be defined in the plugin dir:
+#   https://github.com/mesonbuild/meson/issues/707
+option('with_autotools', type: 'boolean')
+option('with_autotools_templates', type: 'boolean')
+option('with_beautifier', type: 'boolean')
+option('with_c_pack', type: 'boolean')
+option('with_cargo', type: 'boolean')
+option('with_clang', type: 'boolean')
+option('with_cmake', type: 'boolean')
+option('with_color_picker', type: 'boolean')
+option('with_command_bar', type: 'boolean')
+option('with_comment_code', type: 'boolean')
+option('with_create_project', type: 'boolean')
+option('with_ctags', type: 'boolean')
+option('with_devhelp', type: 'boolean')
+option('with_file_search', type: 'boolean')
+option('with_flatpak', type: 'boolean')
+option('with_fpaste', type: 'boolean')
+option('with_gcc', type: 'boolean')
+option('with_gettext', type: 'boolean')
+option('with_git', type: 'boolean')
+option('with_gnome_code_assistance', type: 'boolean')
+option('with_hello_cpp', type: 'boolean')
+option('with_html_completion', type: 'boolean')
+option('with_html_preview', type: 'boolean')
+option('with_jedi', type: 'boolean')
+option('with_jhbuild', type: 'boolean')
+option('with_meson', type: 'boolean')
+option('with_meson_templates', type: 'boolean', value: false)
+option('with_mingw', type: 'boolean')
+option('with_project_tree', type: 'boolean')
+option('with_python_gi_imports_completion', type: 'boolean')
+option('with_python_pack', type: 'boolean')
+option('with_quick_highlight', type: 'boolean')
+option('with_rust_langserv', type: 'boolean')
+option('with_rustup', type: 'boolean')
+option('with_support', type: 'boolean')
+option('with_symbol_tree', type: 'boolean')
+option('with_sysmon', type: 'boolean')
+option('with_sysprof', type: 'boolean')
+option('with_terminal', type: 'boolean')
+option('with_todo', type: 'boolean')
+option('with_vala_pack', type: 'boolean')
+option('with_xml_pack', type: 'boolean')
diff --git a/plugins/autotools-templates/meson.build b/plugins/autotools-templates/meson.build
new file mode 100644
index 0000000..7b93608
--- /dev/null
+++ b/plugins/autotools-templates/meson.build
@@ -0,0 +1,10 @@
+if get_option('with_autotools_templates')
+
+autotools_template_datadir = join_paths(plugindatadir, 'autotools_templates')
+autotools_template_dir = join_paths(plugindir, 'autotools_templates')
+
+install_data('autotools-templates.plugin', install_dir: plugindir)
+install_data('autotools_templates/__init__.py', install_dir: autotools_template_dir)
+install_subdir('autotools_templates/resources', install_dir: autotools_template_datadir)
+
+endif
diff --git a/plugins/autotools/meson.build b/plugins/autotools/meson.build
new file mode 100644
index 0000000..e258ceb
--- /dev/null
+++ b/plugins/autotools/meson.build
@@ -0,0 +1,41 @@
+if get_option('with_autotools')
+
+autotools_sources = [
+  'autotools-plugin.c',
+  'ide-autotools-application-addin.c',
+  'ide-autotools-application-addin.h',
+  'ide-autotools-autogen-stage.c',
+  'ide-autotools-autogen-stage.h',
+  'ide-autotools-build-system.c',
+  'ide-autotools-build-system.h',
+  'ide-autotools-build-target.c',
+  'ide-autotools-build-target.h',
+  'ide-autotools-makecache-stage.c',
+  'ide-autotools-makecache-stage.h',
+  'ide-autotools-pipeline-addin.c',
+  'ide-autotools-pipeline-addin.h',
+  'ide-autotools-project-miner.c',
+  'ide-autotools-project-miner.h',
+  'ide-makecache.c',
+  'ide-makecache.h',
+  'ide-makecache-target.c',
+  'ide-makecache-target.h',
+]
+
+make_exe_name = 'make'
+if find_program('gmake', required: false).found()
+  make_exe_name = 'gmake'
+endif
+
+shared_module('autotools-plugin', autotools_sources,
+  dependencies: plugin_deps,
+  c_args: ['-DGNU_MAKE_NAME="@0@"'.format(make_exe_name)],
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('autotools.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/beautifier/meson.build b/plugins/beautifier/meson.build
new file mode 100644
index 0000000..9674a47
--- /dev/null
+++ b/plugins/beautifier/meson.build
@@ -0,0 +1,36 @@
+if get_option('with_beautifier')
+
+beautifier_resources = gnome.compile_resources(
+  'gb-beautifier-resources',
+  'gb-beautifier.gresource.xml',
+  c_name: 'gb_beautifier'
+)
+
+beautifier_sources = [
+  beautifier_resources,
+  'gb-beautifier-config.c',
+  'gb-beautifier-config.h',
+  'gb-beautifier-helper.c',
+  'gb-beautifier-helper.h',
+  'gb-beautifier-plugin.c',
+  'gb-beautifier-private.h',
+  'gb-beautifier-process.c',
+  'gb-beautifier-process.h',
+  'gb-beautifier-workbench-addin.c',
+  'gb-beautifier-workbench-addin.h',
+]
+
+beautifier_datadir = join_paths(get_option('prefix'), plugindatadir, 'beautifier')
+shared_module('beautifier-plugin', beautifier_sources,
+  dependencies: plugin_deps,
+  c_args: '-DGB_BEAUTIFIER_PLUGIN_DATADIR="@0@"'.format(join_paths(beautifier_datadir, 'data')),
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('beautifier.plugin', install_dir: plugindir)
+install_subdir('data', install_dir: beautifier_datadir)
+
+endif
diff --git a/plugins/c-pack/meson.build b/plugins/c-pack/meson.build
new file mode 100644
index 0000000..5192953
--- /dev/null
+++ b/plugins/c-pack/meson.build
@@ -0,0 +1,23 @@
+if get_option('with_c_pack')
+
+c_pack_sources = [
+  'c-pack-plugin.c',
+  'c-parse-helper.c',
+  'c-parse-helper.h',
+  'ide-c-indenter.c',
+  'ide-c-indenter.h',
+  'ide-c-format-provider.c',
+  'ide-c-format-provider.h',
+]
+
+shared_module('c-pack-plugin', c_pack_sources,
+  dependencies: plugin_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('c-pack.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/cargo/meson.build b/plugins/cargo/meson.build
new file mode 100644
index 0000000..b901443
--- /dev/null
+++ b/plugins/cargo/meson.build
@@ -0,0 +1,5 @@
+if get_option('with_cargo')
+
+install_data(['cargo.plugin', 'cargo_plugin.py'], install_dir: plugindir)
+
+endif
diff --git a/plugins/clang/meson.build b/plugins/clang/meson.build
new file mode 100644
index 0000000..4145e8d
--- /dev/null
+++ b/plugins/clang/meson.build
@@ -0,0 +1,46 @@
+if get_option('with_clang')
+
+clang_sources = [
+  'ide-clang-completion-item.c',
+  'ide-clang-completion-item.h',
+  'ide-clang-completion-item-private.h',
+  'ide-clang-completion-provider.c',
+  'ide-clang-completion-provider.h',
+  'ide-clang-diagnostic-provider.c',
+  'ide-clang-diagnostic-provider.h',
+  'ide-clang-highlighter.c',
+  'ide-clang-highlighter.h',
+  'ide-clang-preferences-addin.c',
+  'ide-clang-preferences-addin.h',
+  'ide-clang-private.h',
+  'ide-clang-service.c',
+  'ide-clang-service.h',
+  'ide-clang-symbol-node.c',
+  'ide-clang-symbol-node.h',
+  'ide-clang-symbol-resolver.c',
+  'ide-clang-symbol-resolver.h',
+  'ide-clang-symbol-tree.c',
+  'ide-clang-symbol-tree.h',
+  'ide-clang-translation-unit.c',
+  'ide-clang-translation-unit.h',
+  'clang-plugin.c',
+]
+
+cc = meson.get_compiler('c')
+libclang = cc.find_library('libclang')
+
+clang_deps = plugin_deps + [
+  libclang,
+]
+
+shared_module('clang-plugin', clang_sources,
+  dependencies: clang_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('clang.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/cmake/meson.build b/plugins/cmake/meson.build
new file mode 100644
index 0000000..6d0da21
--- /dev/null
+++ b/plugins/cmake/meson.build
@@ -0,0 +1,6 @@
+if get_option('with_cmake')
+
+install_data('cmake.plugin', install_dir: plugindir)
+install_data('cmake_plugin/__init__.py', install_dir: join_paths(plugindir, 'cmake_plugin'))
+
+endif
diff --git a/plugins/color-picker/meson.build b/plugins/color-picker/meson.build
new file mode 100644
index 0000000..7c35c2c
--- /dev/null
+++ b/plugins/color-picker/meson.build
@@ -0,0 +1,47 @@
+if get_option('with_color_picker')
+
+color_picker_resources = gnome.compile_resources(
+  'gb-color-picker-resources',
+  'gb-color-picker.gresource.xml',
+  c_name: 'gb_color_picker',
+)
+
+color_picker_sources = [
+  'gb-color-picker-helper.c',
+  'gb-color-picker-helper.h',
+  'gb-color-picker-plugin.c',
+  'gb-color-picker-document-monitor.c',
+  'gb-color-picker-document-monitor.h',
+  'gb-color-picker-prefs.c',
+  'gb-color-picker-prefs.h',
+  'gb-color-picker-prefs-list.c',
+  'gb-color-picker-prefs-palette-list.h',
+  'gb-color-picker-prefs-palette-list.c',
+  'gb-color-picker-prefs-list.h',
+  'gb-color-picker-prefs-palette-row.c',
+  'gb-color-picker-prefs-palette-row.h',
+  'gb-color-picker-private.h',
+  'gb-color-picker-workbench-addin.c',
+  'gb-color-picker-workbench-addin.h',
+  'gb-color-picker-workbench-addin-private.h',
+  color_picker_resources[0],
+]
+
+color_picker_deps = plugin_deps + [
+  libgstyle_dep,
+]
+
+shared_module('color-picker-plugin', color_picker_sources,
+  dependencies: color_picker_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('color-picker.plugin', install_dir: plugindir)
+install_data('gsettings/org.gnome.builder.plugins.color_picker_plugin.gschema.xml',
+  install_dir: schema_dir,
+)
+
+endif
diff --git a/plugins/command-bar/meson.build b/plugins/command-bar/meson.build
new file mode 100644
index 0000000..080f7ec
--- /dev/null
+++ b/plugins/command-bar/meson.build
@@ -0,0 +1,49 @@
+if get_option('with_command_bar')
+
+command_bar_resources = gnome.compile_resources(
+  'gb-command-bar-resources',
+  'gb-command-bar.gresource.xml',
+  c_name: 'gb_command_bar',
+)
+
+command_bar_sources = [
+  command_bar_resources[0],
+  command_bar_resources[1],
+  'gb-command-bar.c',
+  'gb-command-bar.h',
+  'gb-command-gaction-provider.c',
+  'gb-command-gaction-provider.h',
+  'gb-command-gaction.c',
+  'gb-command-gaction.h',
+  'gb-command-manager.c',
+  'gb-command-manager.h',
+  'gb-command-provider.c',
+  'gb-command-provider.h',
+  'gb-command-result.c',
+  'gb-command-result.h',
+  'gb-command-vim-provider.c',
+  'gb-command-vim-provider.h',
+  'gb-command-vim.c',
+  'gb-command-vim.h',
+  'gb-command.c',
+  'gb-command.h',
+  'gb-vim.c',
+  'gb-vim.h',
+]
+
+command_bar_deps = plugin_deps + [
+  libgd_dep,
+  libnautilus_dep,
+]
+
+shared_module('command-bar', command_bar_sources,
+  dependencies: command_bar_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('command-bar.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/comment-code/meson.build b/plugins/comment-code/meson.build
new file mode 100644
index 0000000..39597d0
--- /dev/null
+++ b/plugins/comment-code/meson.build
@@ -0,0 +1,26 @@
+if get_option('with_comment_code')
+
+comment_code_resources = gnome.compile_resources(
+  'gbp-comment-code-resources',
+  'gbp-comment-code.gresource.xml',
+  c_name: 'gbp_comment_code',
+)
+
+comment_code_sources = [
+  'gbp-comment-code-plugin.c',
+  'gbp-comment-code-view-addin.c',
+  'gbp-comment-code-view-addin.h',
+  comment_code_resources[0],
+]
+
+shared_module('comment-code-plugin', comment_code_sources,
+  dependencies: plugin_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('comment-code.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/create-project/meson.build b/plugins/create-project/meson.build
new file mode 100644
index 0000000..c5c5863
--- /dev/null
+++ b/plugins/create-project/meson.build
@@ -0,0 +1,32 @@
+if get_option('with_create_project')
+
+create_project_resources = gnome.compile_resources(
+  'gbp-create-project-resources',
+  'gbp-create-project.gresource.xml',
+  c_name: 'gbp_create_project',
+)
+
+create_project_sources = [
+  'gbp-create-project-genesis-addin.c',
+  'gbp-create-project-genesis-addin.h',
+  'gbp-create-project-plugin.c',
+  'gbp-create-project-template-icon.c',
+  'gbp-create-project-template-icon.h',
+  'gbp-create-project-tool.c',
+  'gbp-create-project-tool.h',
+  'gbp-create-project-widget.c',
+  'gbp-create-project-widget.h',
+  create_project_resources[0],
+]
+
+shared_module('create-project-plugin', create_project_sources,
+  dependencies: plugin_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('create-project.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/ctags/meson.build b/plugins/ctags/meson.build
new file mode 100644
index 0000000..776820a
--- /dev/null
+++ b/plugins/ctags/meson.build
@@ -0,0 +1,36 @@
+if get_option('with_ctags')
+
+ctags_sources = [
+  'ide-ctags-builder.c',
+  'ide-ctags-builder.h',
+  'ide-ctags-completion-item.c',
+  'ide-ctags-completion-item.h',
+  'ide-ctags-completion-provider.c',
+  'ide-ctags-completion-provider.h',
+  'ide-ctags-completion-provider-private.h',
+  'ide-ctags-highlighter.c',
+  'ide-ctags-highlighter.h',
+  'ide-ctags-index.c',
+  'ide-ctags-index.h',
+  'ide-ctags-service.c',
+  'ide-ctags-service.h',
+       'ide-ctags-symbol-node.c',
+  'ide-ctags-symbol-resolver.c',
+  'ide-ctags-symbol-resolver.h',
+  'ide-ctags-symbol-tree.c',
+  'ide-ctags-util.c',
+  'ide-ctags-util.h',
+  'ctags-plugin.c',
+]
+
+shared_module('ctags-plugin', ctags_sources,
+  dependencies: plugin_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('ctags.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/devhelp/meson.build b/plugins/devhelp/meson.build
new file mode 100644
index 0000000..71b6673
--- /dev/null
+++ b/plugins/devhelp/meson.build
@@ -0,0 +1,36 @@
+if get_option('with_devhelp')
+
+devhelp_resources = gnome.compile_resources(
+  'gbp-devhelp-resources',
+  'gbp-devhelp-resources.gresource.xml',
+  c_name: 'gbp_devhelp',
+)
+
+devhelp_sources = [
+  'gbp-devhelp-editor-view-addin.c',
+  'gbp-devhelp-editor-view-addin.h',
+  'gbp-devhelp-panel.c',
+  'gbp-devhelp-panel.h',
+  'gbp-devhelp-plugin.c',
+  'gbp-devhelp-view.c',
+  'gbp-devhelp-view.h',
+  'gbp-devhelp-workbench-addin.c',
+  'gbp-devhelp-workbench-addin.h',
+  devhelp_resources[0],
+]
+
+devhelp_deps = plugin_deps + [
+  dependency('libdevhelp-3.0', version: '>=3.20.0'),
+]
+
+shared_module('devhelp-plugin', devhelp_sources,
+  dependencies: devhelp_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('devhelp.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/file-search/meson.build b/plugins/file-search/meson.build
new file mode 100644
index 0000000..f0988ee
--- /dev/null
+++ b/plugins/file-search/meson.build
@@ -0,0 +1,26 @@
+if get_option('with_file_search')
+
+file_search_sources = [
+  'gb-file-search-provider.c',
+  'gb-file-search-provider.h',
+  'gb-file-search-result.c',
+  'gb-file-search-result.h',
+  'gb-file-search-index.c',
+  'gb-file-search-index.h',
+]
+
+file_search_deps = plugin_deps + [
+  libsearch_dep,
+]
+
+shared_module('file-search', file_search_sources,
+  dependencies: file_search_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('file-search.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/flatpak/meson.build b/plugins/flatpak/meson.build
new file mode 100644
index 0000000..05a4bcc
--- /dev/null
+++ b/plugins/flatpak/meson.build
@@ -0,0 +1,62 @@
+if get_option('with_flatpak')
+
+flatpak_res = gnome.compile_resources(
+  'gbp-flatpak-resources',
+  'gbp-flatpak-resources.gresource.xml',
+  c_name: 'gbp_flatpak'
+)
+
+flatpak_sources = [
+  flatpak_res,
+  'gbp-flatpak-application-addin.c',
+  'gbp-flatpak-application-addin.h',
+  'gbp-flatpak-clone-widget.c',
+  'gbp-flatpak-clone-widget.h',
+  'gbp-flatpak-configuration.c',
+  'gbp-flatpak-configuration.h',
+  'gbp-flatpak-configuration-provider.c',
+  'gbp-flatpak-configuration-provider.h',
+  'gbp-flatpak-genesis-addin.c',
+  'gbp-flatpak-genesis-addin.h',
+  'gbp-flatpak-pipeline-addin.c',
+  'gbp-flatpak-pipeline-addin.h',
+  'gbp-flatpak-preferences-addin.c',
+  'gbp-flatpak-preferences-addin.h',
+  'gbp-flatpak-plugin.c',
+  'gbp-flatpak-runner.c',
+  'gbp-flatpak-runner.h',
+  'gbp-flatpak-runtime-provider.c',
+  'gbp-flatpak-runtime-provider.h',
+  'gbp-flatpak-runtime.c',
+  'gbp-flatpak-runtime.h',
+  'gbp-flatpak-sources.c',
+  'gbp-flatpak-sources.h',
+  'gbp-flatpak-subprocess-launcher.c',
+  'gbp-flatpak-subprocess-launcher.h',
+  'gbp-flatpak-transfer.c',
+  'gbp-flatpak-transfer.h',
+  'gbp-flatpak-util.c',
+  'gbp-flatpak-util.h',
+]
+
+
+
+flatpak_deps = plugin_deps + [
+  dependency('flatpak', version: '>= 0.8.0'),
+  dependency('libsoup-2.4', version: '>= 2.52.0'),
+  dependency('libgit2-glib-1.0', version: '>= 0.24.0'), # FIXME: 0.25.0
+]
+
+# FIXME: Check for libgit thread and ssh support
+
+shared_module('flatpak-plugin', flatpak_sources,
+  dependencies: flatpak_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('flatpak.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/fpaste/meson.build b/plugins/fpaste/meson.build
new file mode 100644
index 0000000..6d9a3be
--- /dev/null
+++ b/plugins/fpaste/meson.build
@@ -0,0 +1,10 @@
+if get_option('with_fpaste')
+
+fpaste_datadir = join_paths(plugindatadir, 'fpaste_plugin')
+fpaste_dir = join_paths(plugindir, 'fpaste_plugin')
+
+install_data('fpaste.plugin', install_dir: plugindir)
+install_data('fpaste_plugin/__init__.py', install_dir: fpaste_dir)
+install_subdir('fpaste_plugin/gtk', install_dir: fpaste_datadir)
+
+endif
diff --git a/plugins/gcc/meson.build b/plugins/gcc/meson.build
new file mode 100644
index 0000000..1e75261
--- /dev/null
+++ b/plugins/gcc/meson.build
@@ -0,0 +1,19 @@
+if get_option('with_gcc')
+
+gcc_sources = [
+  'gbp-gcc-pipeline-addin.c',
+  'gbp-gcc-pipeline-addin.h',
+  'gbp-gcc-plugin.c',
+]
+
+shared_module('gcc-plugin', gcc_sources,
+  dependencies: plugin_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('gcc.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/gettext/meson.build b/plugins/gettext/meson.build
new file mode 100644
index 0000000..e817363
--- /dev/null
+++ b/plugins/gettext/meson.build
@@ -0,0 +1,19 @@
+if get_option('with_gettext')
+
+gettext_sources = [
+  'ide-gettext-diagnostic-provider.c',
+  'ide-gettext-diagnostic-provider.h',
+  'gettext-plugin.c',
+]
+
+shared_module('gettext-plugin', gettext_sources,
+  dependencies: plugin_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('gettext.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/git/meson.build b/plugins/git/meson.build
new file mode 100644
index 0000000..3f0ed6d
--- /dev/null
+++ b/plugins/git/meson.build
@@ -0,0 +1,78 @@
+if get_option('with_git')
+
+libgit_dep = dependency('libgit2-glib-1.0', version: '>=0.24.0')
+cc = meson.get_compiler('c')
+
+libgit_thread_safe_check = '
+               #include <libgit2-glib/ggit.h>
+               int
+               main(int argc, const char *argv[])
+               {
+                       ggit_init ();
+                       return ((ggit_get_features() & GGIT_FEATURE_THREADS) != 0) ? 0 : 1;
+               }
+'
+res = cc.run(libgit_thread_safe_check,
+  dependencies: libgit_dep,
+)
+if res.returncode() != 0
+  error('libgit2 was not compiled with -DTHREADSAFE:BOOL=ON')
+endif
+
+libgit_ssh_check = '
+               #include <libgit2-glib/ggit.h>
+               int
+               main(int argc, const char *argv[])
+               {
+                       ggit_init ();
+                       return ((ggit_get_features() & GGIT_FEATURE_SSH) != 0) ? 0 : 1;
+               }
+'
+
+res = cc.run(libgit_ssh_check,
+  dependencies: libgit_dep,
+)
+if res.returncode() != 0
+  error('libgit2 was not compiled with SSH support')
+endif
+
+git_resources = gnome.compile_resources(
+  'ide-git-resources',
+  'ide-git-resources.gresource.xml',
+  c_name: 'ide_git',
+)
+
+git_sources = [
+  'ide-git-buffer-change-monitor.c',
+  'ide-git-buffer-change-monitor.h',
+  'ide-git-clone-widget.c',
+  'ide-git-clone-widget.h',
+  'ide-git-genesis-addin.c',
+  'ide-git-genesis-addin.h',
+  'ide-git-plugin.c',
+  'ide-git-remote-callbacks.c',
+  'ide-git-remote-callbacks.h',
+  'ide-git-vcs.c',
+  'ide-git-vcs.h',
+  'ide-git-vcs-config.c',
+  'ide-git-vcs-config.h',
+  'ide-git-vcs-initializer.c',
+  'ide-git-vcs-initializer.h',
+  git_resources[0],
+]
+
+git_deps = plugin_deps + [
+  libgit_dep,
+]
+
+shared_module('git-plugin', git_sources,
+  dependencies: git_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('git.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/gnome-code-assistance/meson.build b/plugins/gnome-code-assistance/meson.build
new file mode 100644
index 0000000..600d132
--- /dev/null
+++ b/plugins/gnome-code-assistance/meson.build
@@ -0,0 +1,32 @@
+if get_option('with_gnome_code_assistance')
+
+gnome_code_assistance_sources = [
+  'gca-diagnostics.c',
+  'gca-diagnostics.h',
+  'gca-service.c',
+  'gca-service.h',
+  'gca-structs.c',
+  'gca-structs.h',
+  'gca-plugin.c',
+  'ide-gca-diagnostic-provider.c',
+  'ide-gca-diagnostic-provider.h',
+  'ide-gca-preferences-addin.c',
+  'ide-gca-preferences-addin.h',
+  'ide-gca-service.c',
+  'ide-gca-service.h',
+]
+
+shared_module('gnome-code-assistance-plugin', gnome_code_assistance_sources,
+  dependencies: plugin_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('gnome-code-assistance.plugin', install_dir: plugindir)
+
+install_data('org.gnome.builder.gnome-code-assistance.gschema.xml',
+  install_dir: schema_dir)
+
+endif
diff --git a/plugins/html-completion/meson.build b/plugins/html-completion/meson.build
new file mode 100644
index 0000000..6c5b6e9
--- /dev/null
+++ b/plugins/html-completion/meson.build
@@ -0,0 +1,22 @@
+if get_option('with_html_completion')
+
+html_completion_sources = [
+       'ide-html-completion-provider.c',
+       'ide-html-completion-provider.h',
+]
+
+html_completion_deps = plugin_deps + [
+  libsearch_dep,
+]
+
+shared_module('html-completion-plugin', html_completion_sources,
+  dependencies: html_completion_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('html-completion.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/html-preview/meson.build b/plugins/html-preview/meson.build
new file mode 100644
index 0000000..b3444c3
--- /dev/null
+++ b/plugins/html-preview/meson.build
@@ -0,0 +1,15 @@
+if get_option('with_html_preview')
+
+html_preview_datadir = join_paths(plugindatadir, 'html_preview_plugin')
+html_preview_dir = join_paths(plugindir, 'html_preview_plugin')
+
+install_data('html-preview.plugin', install_dir: plugindir)
+install_data('html_preview_plugin/__init__.py', install_dir: html_preview_dir)
+install_data([
+  'html_preview_plugin/markdown-view.js',
+  'html_preview_plugin/markdown.css',
+  'html_preview_plugin/marked.js',
+], install_dir: html_preview_datadir)
+install_subdir('html_preview_plugin/gtk', install_dir: html_preview_datadir)
+
+endif
diff --git a/plugins/jedi/meson.build b/plugins/jedi/meson.build
new file mode 100644
index 0000000..6729699
--- /dev/null
+++ b/plugins/jedi/meson.build
@@ -0,0 +1,5 @@
+if get_option('with_jedi')
+
+install_data(['jedi.plugin', 'jedi_plugin.py'], install_dir: plugindir)
+
+endif
diff --git a/plugins/jhbuild/meson.build b/plugins/jhbuild/meson.build
new file mode 100644
index 0000000..400e3e0
--- /dev/null
+++ b/plugins/jhbuild/meson.build
@@ -0,0 +1,5 @@
+if get_option('with_jhbuild')
+
+install_data(['jhbuild.plugin', 'jhbuild_plugin.py'], install_dir: plugindir)
+
+endif
diff --git a/plugins/meson-templates/meson.build b/plugins/meson-templates/meson.build
new file mode 100644
index 0000000..4c4139f
--- /dev/null
+++ b/plugins/meson-templates/meson.build
@@ -0,0 +1,10 @@
+if get_option('with_meson_templates')
+
+meson_template_datadir = join_paths(plugindatadir, 'meson_templates')
+meson_template_dir = join_paths(plugindir, 'meson_templates')
+
+install_data('meson-templates.plugin', install_dir: plugindir)
+install_data('meson_templates/__init__.py', install_dir: meson_template_dir)
+install_subdir('meson_templates/resources', install_dir: meson_template_datadir)
+
+endif
diff --git a/plugins/meson.build b/plugins/meson.build
new file mode 100644
index 0000000..8863c69
--- /dev/null
+++ b/plugins/meson.build
@@ -0,0 +1,53 @@
+plugindir = join_paths(get_option('libdir'), 'gnome-builder/plugins')
+plugindatadir = join_paths(get_option('datadir'), 'gnome-builder/plugins')
+plugin_deps = [
+  libpeas_dep,
+  libide_plugin_dep,
+]
+
+plugin_link_deps = join_paths(meson.current_source_dir(), 'plugins.map')
+plugin_link_args = [
+  '-Wl,--version-script,' + plugin_link_deps,
+]
+
+subdir('autotools')
+subdir('autotools-templates')
+subdir('beautifier')
+subdir('c-pack')
+subdir('cargo')
+subdir('clang')
+subdir('cmake')
+subdir('color-picker')
+subdir('command-bar')
+subdir('comment-code')
+subdir('create-project')
+subdir('ctags')
+subdir('devhelp')
+subdir('file-search')
+subdir('flatpak')
+subdir('fpaste')
+subdir('gcc')
+subdir('gettext')
+subdir('git')
+subdir('gnome-code-assistance')
+subdir('html-completion')
+subdir('html-preview')
+subdir('jedi')
+subdir('jhbuild')
+subdir('meson')
+subdir('meson-templates')
+subdir('mingw')
+subdir('project-tree')
+subdir('python-gi-imports-completion')
+subdir('python-pack')
+subdir('quick-highlight')
+subdir('rust-langserv')
+subdir('rustup')
+subdir('support')
+subdir('symbol-tree')
+subdir('sysmon')
+subdir('sysprof')
+subdir('terminal')
+subdir('todo')
+subdir('vala-pack')
+subdir('xml-pack')
diff --git a/plugins/meson/meson.build b/plugins/meson/meson.build
new file mode 100644
index 0000000..55aa62e
--- /dev/null
+++ b/plugins/meson/meson.build
@@ -0,0 +1,6 @@
+if get_option('with_meson')
+
+install_data('meson.plugin', install_dir: plugindir)
+install_data('meson_plugin/__init__.py', install_dir: join_paths(plugindir, 'meson_plugin'))
+
+endif
diff --git a/plugins/mingw/meson.build b/plugins/mingw/meson.build
new file mode 100644
index 0000000..582fed4
--- /dev/null
+++ b/plugins/mingw/meson.build
@@ -0,0 +1,21 @@
+if get_option('with_mingw')
+
+mingw_sources = [
+  'mingw-plugin.c',
+  'ide-mingw-device.c',
+  'ide-mingw-device.h',
+  'ide-mingw-device-provider.c',
+  'ide-mingw-device-provider.h',
+]
+
+shared_module('mingw-plugin', mingw_sources,
+  dependencies: plugin_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('mingw.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/plugins.map b/plugins/plugins.map
new file mode 100644
index 0000000..cc1cad7
--- /dev/null
+++ b/plugins/plugins.map
@@ -0,0 +1,6 @@
+{
+global:
+        peas_register_types;
+local:
+        *;
+};
diff --git a/plugins/project-tree/meson.build b/plugins/project-tree/meson.build
new file mode 100644
index 0000000..ef1ec4e
--- /dev/null
+++ b/plugins/project-tree/meson.build
@@ -0,0 +1,53 @@
+if get_option('with_project_tree')
+
+project_tree_resources = gnome.compile_resources(
+  'gb-project-tree-resources',
+  'gb-project-tree.gresource.xml',
+  c_name: 'gb_project_tree',
+)
+
+project_tree_sources = [
+  project_tree_resources[0],
+  project_tree_resources[1],
+  'gb-new-file-popover.c',
+  'gb-new-file-popover.h',
+  'gb-project-file.c',
+  'gb-project-file.h',
+  'gb-project-tree-actions.c',
+  'gb-project-tree-actions.h',
+  'gb-project-tree-builder.c',
+  'gb-project-tree-builder.h',
+  'gb-project-tree.c',
+  'gb-project-tree.h',
+  'gb-project-tree-editor-addin.c',
+  'gb-project-tree-editor-addin.h',
+  'gb-project-tree-private.h',
+  'gb-rename-file-popover.c',
+  'gb-rename-file-popover.h',
+  'gb-project-tree-addin.c',
+  'gb-project-tree-addin.h',
+  'project-tree-plugin.c',
+]
+
+project_tree_deps = plugin_deps
+project_tree_cflags = []
+
+if get_option('with_terminal')
+
+project_tree_deps += dependency('vte-2.91', version: '>=0.40.2')
+project_tree_cflags += '-DHAVE_VTE'
+
+endif
+
+shared_module('project-tree-plugin', project_tree_sources,
+  dependencies: project_tree_deps,
+  c_args: project_tree_cflags,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('project-tree.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/python-gi-imports-completion/meson.build 
b/plugins/python-gi-imports-completion/meson.build
new file mode 100644
index 0000000..25b7e08
--- /dev/null
+++ b/plugins/python-gi-imports-completion/meson.build
@@ -0,0 +1,8 @@
+if get_option('with_python_gi_imports_completion')
+
+install_data([
+  'python-gi-imports-completion.plugin',
+  'python_gi_imports_completion.py'
+], install_dir: plugindir)
+
+endif
diff --git a/plugins/python-pack/meson.build b/plugins/python-pack/meson.build
new file mode 100644
index 0000000..c63083f
--- /dev/null
+++ b/plugins/python-pack/meson.build
@@ -0,0 +1,21 @@
+if get_option('with_python_pack')
+
+python_pack_sources = [
+  'ide-python-indenter.c',
+  'ide-python-indenter.h',
+  'ide-python-format-provider.c',
+  'ide-python-format-provider.h',
+  'python-pack-plugin.c',
+]
+
+shared_module('python-pack-plugin', python_pack_sources,
+  dependencies: plugin_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('python-pack.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/quick-highlight/meson.build b/plugins/quick-highlight/meson.build
new file mode 100644
index 0000000..22187ff
--- /dev/null
+++ b/plugins/quick-highlight/meson.build
@@ -0,0 +1,21 @@
+if get_option('with_quick_highlight')
+
+quick_highlight_sources = [
+  'gbp-quick-highlight-plugin.c',
+  'gbp-quick-highlight-view-addin.c',
+  'gbp-quick-highlight-view-addin.h',
+  'gbp-quick-highlight-preferences.c',
+  'gbp-quick-highlight-preferences.h',
+]
+
+shared_module('quick-highlight-plugin', quick_highlight_sources,
+  dependencies: plugin_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('quick-highlight.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/rust-langserv/meson.build b/plugins/rust-langserv/meson.build
new file mode 100644
index 0000000..8e5eff9
--- /dev/null
+++ b/plugins/rust-langserv/meson.build
@@ -0,0 +1,6 @@
+if get_option('with_rust_langserv')
+
+install_data('rust-langserv.plugin', install_dir: plugindir)
+install_data('rust_langserv_plugin.py', install_dir: plugindir)
+
+endif
diff --git a/plugins/rustup/meson.build b/plugins/rustup/meson.build
new file mode 100644
index 0000000..c5da7a1
--- /dev/null
+++ b/plugins/rustup/meson.build
@@ -0,0 +1,9 @@
+if get_option('with_rustup')
+
+rustup_dir = join_paths(plugindir, 'rustup_plugin')
+install_data('rustup.plugin', install_dir: plugindir)
+install_data('rustup_plugin/__init__.py', install_dir: rustup_dir)
+install_subdir('rustup_plugin/resources', install_dir: rustup_dir)
+
+
+endif
diff --git a/plugins/support/meson.build b/plugins/support/meson.build
new file mode 100644
index 0000000..41a5b47
--- /dev/null
+++ b/plugins/support/meson.build
@@ -0,0 +1,28 @@
+if get_option('with_support')
+
+support_resources = gnome.compile_resources(
+  'ide-support-resources',
+  'ide-support-resources.gresource.xml',
+  c_name: 'ide_support',
+)
+
+support_sources = [
+  'ide-support-application-addin.c',
+  'ide-support-application-addin.h',
+  'ide-support.c',
+  'ide-support.h',
+  'ide-support-plugin.c',
+  support_resources[0],
+]
+
+shared_module('support-plugin', support_sources,
+  dependencies: plugin_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('support.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/symbol-tree/meson.build b/plugins/symbol-tree/meson.build
new file mode 100644
index 0000000..3bffeb8
--- /dev/null
+++ b/plugins/symbol-tree/meson.build
@@ -0,0 +1,30 @@
+if get_option('with_symbol_tree')
+
+symbol_tree_resources = gnome.compile_resources(
+  'symbol-tree-resources',
+  'symbol-tree.gresource.xml',
+  c_name: 'symbol_tree',
+)
+
+symbol_tree_sources = [
+  symbol_tree_resources[0],
+  symbol_tree_resources[1],
+  'symbol-tree-builder.c',
+  'symbol-tree-builder.h',
+  'symbol-tree-panel.c',
+  'symbol-tree-panel.h',
+  'symbol-tree.c',
+  'symbol-tree.h',
+]
+
+shared_module('symbol-tree', symbol_tree_sources,
+  dependencies: plugin_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('symbol-tree.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/sysmon/meson.build b/plugins/sysmon/meson.build
new file mode 100644
index 0000000..a288254
--- /dev/null
+++ b/plugins/sysmon/meson.build
@@ -0,0 +1,32 @@
+if get_option('with_sysmon')
+
+sysmon_resources = gnome.compile_resources(
+  'gb-sysmon-resources',
+  'gb-sysmon.gresource.xml',
+  c_name: 'gb_sysmon',
+)
+
+sysmon_sources = [
+  sysmon_resources[0],
+  sysmon_resources[1],
+  'gb-sysmon-panel.c',
+  'gb-sysmon-panel.h',
+  'gb-sysmon-addin.c',
+  'gb-sysmon-addin.h',
+]
+
+sysmon_deps = plugin_deps + [
+  librg_dep,
+]
+
+shared_module('sysmon', sysmon_sources,
+  dependencies: sysmon_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('sysmon.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/sysprof/meson.build b/plugins/sysprof/meson.build
new file mode 100644
index 0000000..c8faf66
--- /dev/null
+++ b/plugins/sysprof/meson.build
@@ -0,0 +1,33 @@
+if get_option('with_sysprof')
+
+sysprof_resources = gnome.compile_resources(
+  'gbp-sysprof-resources',
+  'sysprof.gresource.xml',
+  c_name: 'gbp_sysprof',
+)
+
+sysprof_sources = [
+  sysprof_resources[0],
+  sysprof_resources[1],
+  'gbp-sysprof-plugin.c',
+  'gbp-sysprof-perspective.c',
+  'gbp-sysprof-perspective.h',
+  'gbp-sysprof-workbench-addin.c',
+  'gbp-sysprof-workbench-addin.h',
+]
+
+sysprof_deps = plugin_deps + [
+  dependency('sysprof-ui-2', version: '>=3.21.90'),
+]
+
+shared_module('sysprof-plugin', sysprof_sources,
+  dependencies: sysprof_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('sysprof.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/terminal/meson.build b/plugins/terminal/meson.build
new file mode 100644
index 0000000..9288c1e
--- /dev/null
+++ b/plugins/terminal/meson.build
@@ -0,0 +1,46 @@
+if get_option('with_terminal')
+
+terminal_resources = gnome.compile_resources(
+  'gb-terminal-resources',
+  'gb-terminal.gresource.xml',
+  c_name: 'gb_terminal',
+)
+
+terminal_sources = [
+  terminal_resources,
+  'gb-terminal.c',
+  'gb-terminal.h',
+  'gb-terminal-application-addin.c',
+  'gb-terminal-application-addin.h',
+  'gb-terminal-plugin.c',
+  'gb-terminal-private.h',
+  'gb-terminal-util.c',
+  'gb-terminal-util.h',
+  'gb-terminal-view.c',
+  'gb-terminal-view.h',
+  'gb-terminal-view-private.h',
+  'gb-terminal-view-actions.c',
+  'gb-terminal-view-actions.h',
+  'gb-terminal-search.c',
+  'gb-terminal-search.h',
+  'gb-terminal-search-private.h',
+  'gb-terminal-workbench-addin.c',
+  'gb-terminal-workbench-addin.h',
+]
+
+terminal_deps = plugin_deps + [
+  dependency('vte-2.91', version: '>=0.40.2'),
+  libgd_dep,
+]
+
+shared_module('terminal', terminal_sources,
+  dependencies: terminal_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('terminal.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/todo/meson.build b/plugins/todo/meson.build
new file mode 100644
index 0000000..5e3ae89
--- /dev/null
+++ b/plugins/todo/meson.build
@@ -0,0 +1,6 @@
+if get_option('with_todo')
+
+install_data('todo.plugin', install_dir: plugindir)
+install_subdir('todo_plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/vala-pack/meson.build b/plugins/vala-pack/meson.build
new file mode 100644
index 0000000..769adad
--- /dev/null
+++ b/plugins/vala-pack/meson.build
@@ -0,0 +1,100 @@
+if get_option('with_vala_pack')
+
+if not get_option('with_vapi')
+#  error('You must enable VAPI generation to build the Vala pack')
+endif
+
+add_languages('vala')
+
+libvala_options = [
+  ['libvala-0.36', ''],
+  ['libvala-0.34', ''],
+  ['libvala-0.32', ''],
+  ['libvala-0.30', '>=0.29.3'],
+
+]
+
+libvala_found = false
+foreach v: libvala_options
+  if not libvala_found or not libvala.found()
+    if v[1] != ''
+      libvala = dependency(v[0], version: v[1], required: false)
+    else
+      libvala = dependency(v[0], required: false)
+    endif
+    libvala_found = libvala.found()
+    libvala_version = v[0].split('-')[1]
+  endif
+endforeach
+
+if not libvala_found
+  error('Failed to find suitable libvala')
+endif
+
+# Check for deprecated symbol support
+vala_deprecated_symbol = cc.links('''
+  #include <vala.h>
+  vala_symbol_get_deprecated (NULL);
+''', dependencies: libvala)
+
+# Check for deprecated threading support
+vala_deprecated_threading = cc.links('''
+  #include <vala.h>
+  vala_code_context_set_thread (NULL, TRUE);
+''', dependencies: libvala)
+
+vala_extra_args = []
+if vala_deprecated_symbol
+  vala_extra_args += '--define=ENABLE_VALA_SYMBOL_GET_DEPRECATED'
+endif
+if vala_deprecated_threading
+  vala_extra_args += '--define=ENABLE_VALA_CODE_CONTEXT_SET_THREAD'
+endif
+
+vala_pack_sources = [
+  'config.vapi',
+  'ide-vala-service.vala',
+  'ide-vala-completion.vala',
+  'ide-vala-completion-item.vala',
+  'ide-vala-completion-provider.vala',
+  'ide-vala-diagnostics.vala',
+  'ide-vala-diagnostic-provider.vala',
+  'ide-vala-indenter.vala',
+  'ide-vala-index.vala',
+  'ide-vala-locator.vala',
+  'ide-vala-preferences-addin.vala',
+  'ide-vala-source-file.vala',
+  'ide-vala-symbol-resolver.vala',
+  'ide-vala-symbol-tree.vala',
+  'vala-pack-plugin.vala',
+]
+
+shared_module('vala-pack-plugin', vala_pack_sources,
+  dependencies: plugin_deps + [
+    libvala,
+    libide_vapi,
+  ],
+  vala_args: [
+    '--pkg=posix',
+    '--pkg=libpeas-1.0',
+    '--pkg=gtksourceview-3.0',
+    '--pkg=gio-2.0',
+    '--pkg=libvala-' + libvala_version,
+  ] + vala_extra_args,
+  c_args: [
+    '-DVALA_VERSION="@0@"'.format(libvala_version),
+    '-DLOG_DOMAIN="vala-pack-plugin"',
+    '-DGETTEXT_PACKAGE="gnome-builder"',
+    '-DPACKAGE_DATADIR="@0@"'.format(join_paths(get_option('prefix'),
+                                                get_option('datadir'),
+                                                'gnome-builder')),
+  ],
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('vala-pack.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/xml-pack/meson.build b/plugins/xml-pack/meson.build
new file mode 100644
index 0000000..7e9939c
--- /dev/null
+++ b/plugins/xml-pack/meson.build
@@ -0,0 +1,51 @@
+if get_option('with_xml_pack')
+
+xml_pack_sources = [
+  'ide-xml-analysis.c',
+  'ide-xml-analysis.h',
+  'ide-xml-diagnostic-provider.c',
+  'ide-xml-diagnostic-provider.h',
+  'ide-xml-highlighter.c',
+  'ide-xml-highlighter.h',
+  'ide-xml-indenter.c',
+  'ide-xml-indenter.h',
+  'ide-xml-sax.c',
+  'ide-xml-sax.h',
+  'ide-xml-service.c',
+  'ide-xml-service.h',
+  'ide-xml-stack.c',
+  'ide-xml-stack.h',
+  'ide-xml-symbol-node.c',
+  'ide-xml-symbol-node.h',
+  'ide-xml-symbol-resolver.c',
+  'ide-xml-symbol-resolver.h',
+  'ide-xml-symbol-tree.c',
+  'ide-xml-symbol-tree.h',
+  'ide-xml-tree-builder.c',
+  'ide-xml-tree-builder.h',
+  'ide-xml-tree-builder-generic.c',
+  'ide-xml-tree-builder-generic.h',
+  'ide-xml-tree-builder-ui.c',
+  'ide-xml-tree-builder-ui.h',
+  'ide-xml-tree-builder-utils.c',
+  'ide-xml-tree-builder-utils-private.h',
+  'ide-xml.c',
+  'ide-xml.h',
+  'xml-pack-plugin.c',
+]
+
+xml_pack_deps = plugin_deps + [
+  libxml_dep,
+]
+
+shared_module('xml-pack-plugin', xml_pack_sources,
+  dependencies: xml_pack_deps,
+  link_args: plugin_link_args,
+  link_depends: plugin_link_deps,
+  install: true,
+  install_dir: plugindir,
+)
+
+install_data('xml-pack.plugin', install_dir: plugindir)
+
+endif
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..2da1bba
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,9 @@
+i18n = import('i18n')
+
+i18n.gettext('gnome-builder',
+  preset: 'glib',
+  args: [
+    
'--msgid-bugs-address=https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-builder&keywords=I18N+L10N&component=general',
+  ],
+  data_dirs: [join_paths(meson.source_root(), 'contrib/gstyle/data')],
+)
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..5e89bf4
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,227 @@
+ide_test_env = [
+  
'GI_TYPELIB_PATH="@0@/libide:@0@/contrib/tmpl:@0@/contrib/egg:@0@/contrib/pnl:$(GI_TYPELIB_PATH)"'.format(meson.build_root()),
+  'GB_IN_TREE_PLUGINS=1',
+  'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+  'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+  'G_DEBUG=gc-friendly',
+  'GSETTINGS_BACKEND=memory',
+  'PYTHONDONTWRITEBYTECODE=yes',
+  'MALLOC_CHECK_=2',
+#  'MALLOC_PERTURB_=$((${RANDOM:-256} % 256))',
+]
+ide_test_cflags = [
+       '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir()),
+]
+
+ide_context = executable('test-ide-context',
+  'test-ide-context.c',
+  c_args: ide_test_cflags,
+  dependencies: libide_dep,
+)
+test('test-ide-context', ide_context,
+  env: ide_test_env,
+)
+
+
+ide_back_forward_list = executable('test-ide-back-forward-list',
+  'test-ide-back-forward-list.c',
+  c_args: ide_test_cflags,
+  dependencies: libide_dep,
+)
+test('test-ide-back-forward-list', ide_back_forward_list,
+  env: ide_test_env,
+)
+
+
+ide_buffer_manager = executable('test-ide-buffer-manager',
+  'test-ide-buffer-manager.c',
+  c_args: ide_test_cflags,
+  dependencies: libide_dep,
+)
+test('test-ide-buffer-manager', ide_buffer_manager,
+  env: ide_test_env,
+)
+
+
+ide_buffer = executable('test-ide-buffer',
+  'test-ide-buffer.c',
+  c_args: ide_test_cflags,
+  dependencies: libide_dep,
+)
+test('test-ide-buffer', ide_buffer,
+  env: ide_test_env,
+)
+
+
+ide_doap = executable('test-ide-doap',
+  'test-ide-doap.c',
+  c_args: ide_test_cflags,
+  dependencies: libide_dep,
+)
+test('test-ide-doap', ide_doap,
+  env: ide_test_env,
+)
+
+
+ide_file_settings = executable('test-ide-file-settings',
+  'test-ide-file-settings.c',
+  c_args: ide_test_cflags,
+  dependencies: libide_dep,
+)
+test('test-ide-file-settings', ide_file_settings,
+  env: ide_test_env,
+)
+
+
+ide_indenter = executable('test-ide-indenter',
+  'test-ide-indenter.c',
+  c_args: ide_test_cflags,
+  dependencies: [
+    libide_dep,
+    libpeas_dep,
+  ],
+)
+test('test-ide-indenter', ide_indenter,
+  env: ide_test_env,
+)
+
+
+ide_vcs_uri = executable('test-ide-vcs-uri',
+  'test-ide-vcs-uri.c',
+  c_args: ide_test_cflags,
+  dependencies: libide_dep,
+)
+test('test-ide-vcs-uri', ide_vcs_uri,
+  env: ide_test_env,
+)
+
+
+ide_uri = executable('test-ide-uri',
+  'test-ide-uri.c',
+  c_args: ide_test_cflags,
+  dependencies: libide_dep,
+)
+test('test-ide-uri', ide_uri,
+  env: ide_test_env,
+)
+
+
+test_vim = executable('test-vim',
+  'test-vim.c',
+  c_args: ide_test_cflags,
+  dependencies: libide_dep,
+)
+test('test-vim', test_vim,
+  env: ide_test_env,
+)
+
+
+test_cpu_graph = executable('test-cpu-graph',
+  'test-cpu-graph.c',
+  c_args: ide_test_cflags,
+  dependencies: [libide_dep, librg_dep],
+)
+#test('test-cpu-graph', test_cpu_graph,
+#  env: ide_test_env,
+#)
+
+
+test_fuzzy = executable('test-fuzzy',
+  'test-fuzzy.c',
+  c_args: ide_test_cflags,
+  dependencies: [libide_dep, libsearch_dep],
+)
+#test('test-fuzzy', test_fuzzy,
+#  env: ide_test_env,
+#)
+
+
+test_egg_slider = executable('test-egg-slider',
+  'test-egg-slider.c',
+  c_args: ide_test_cflags,
+  dependencies: libegg_dep,
+)
+#test('test-egg-slider', test_egg_slider,
+#  env: ide_test_env,
+#)
+
+
+test_snippet_parser = executable('test-snippet-parser',
+  'test-snippet-parser.c',
+  c_args: ide_test_cflags,
+  dependencies: libide_dep,
+)
+#test('test-snippet-parser', test_snippet_parser,
+#  env: ide_test_env,
+#)
+
+
+test_egg_binding_group = executable('test-egg-binding-group',
+  'test-egg-binding-group.c',
+  c_args: ide_test_cflags,
+  dependencies: libegg_dep,
+)
+test('test-egg-binding-group', test_egg_binding_group,
+  env: ide_test_env,
+)
+
+
+test_egg_menu_manager = executable('test-egg-menu-manager',
+  'test-egg-menu-manager.c',
+  c_args: ide_test_cflags,
+  dependencies: libegg_dep,
+)
+#test('test-egg-menu-manager', test_egg_menu_manager,
+#  env: ide_test_env,
+#)
+
+
+test_egg_state_machine = executable('test-egg-state-machine',
+  'test-egg-state-machine.c',
+  c_args: ide_test_cflags,
+  dependencies: libegg_dep,
+)
+test('test-egg-state-machine', test_egg_state_machine,
+  env: ide_test_env,
+)
+
+
+test_egg_radio_box = executable('test-egg-radio-box',
+  'test-egg-radio-box.c',
+  c_args: ide_test_cflags,
+  dependencies: libegg_dep,
+)
+#test('test-egg-radio-box', test_egg_radio_box,
+#  env: ide_test_env,
+#)
+
+
+test_egg_file_chooser_entry = executable('test-egg-file-chooser-entry',
+  'test-egg-file-chooser-entry.c',
+  c_args: ide_test_cflags,
+  dependencies: libegg_dep,
+)
+#test('test-egg-file-chooser-entry', test_egg_file_chooser_entry,
+#  env: ide_test_env,
+#)
+
+
+test_egg_cache = executable('test-egg-cache',
+  'test-egg-cache.c',
+  c_args: ide_test_cflags,
+  dependencies: libegg_dep,
+)
+test('test-egg-cache', test_egg_cache,
+  env: ide_test_env,
+)
+
+
+test_egg_heap = executable('test-egg-heap',
+  'test-egg-heap.c',
+  c_args: ide_test_cflags,
+  dependencies: libegg_dep,
+)
+test('test-egg-heap', test_egg_heap,
+  env: ide_test_env,
+)
+
diff --git a/tests/test-fuzzy.c b/tests/test-fuzzy.c
index 9f39c1c..a4a347c 100644
--- a/tests/test-fuzzy.c
+++ b/tests/test-fuzzy.c
@@ -1,5 +1,5 @@
 #include <fuzzy.h>
-#include <ide-line-reader.h>
+#include <ide.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/tools/meson.build b/tools/meson.build
new file mode 100644
index 0000000..cc0fe34
--- /dev/null
+++ b/tools/meson.build
@@ -0,0 +1,6 @@
+ide_list_counters = executable('ide-list-counters',
+  'ide-list-counters.c',
+  dependencies: libegg_dep,
+  install: true,
+  install_dir: join_paths(get_option('libexecdir'), 'gnome-builder'),
+)


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