[gnome-control-center/wip/inigomartinez/meson: 2/4] build: Port to meson build system



commit d42f36c859e10bb71ff9b6772c1fd093f227cb78
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Tue Jul 25 22:28:38 2017 +0200

    build: Port to meson build system
    
    meson is a build system focused on speed an ease of use, which
    helps speeding up the software development. This patch adds meson
    support along autotools.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=785414

 Makefile.am                                  |    6 +-
 man/Makefile.am                              |    4 +-
 man/meson.build                              |   26 ++
 meson.build                                  |  409 ++++++++++++++++++++++++++
 meson_options.txt                            |    5 +
 meson_post_install.py                        |   10 +
 panels/Makefile.am                           |    2 +
 panels/background/Makefile.am                |    2 +-
 panels/background/meson.build                |  128 ++++++++
 panels/bluetooth/Makefile.am                 |    2 +-
 panels/bluetooth/meson.build                 |   42 +++
 panels/color/Makefile.am                     |    2 +-
 panels/color/icons/Makefile.am               |    2 +
 panels/color/icons/meson.build               |   21 ++
 panels/color/meson.build                     |   63 ++++
 panels/common/Makefile.am                    |    2 +-
 panels/common/meson.build                    |   83 ++++++
 panels/datetime/Makefile.am                  |    4 +-
 panels/datetime/icons/meson.build            |   19 ++
 panels/datetime/meson.build                  |  217 ++++++++++++++
 panels/datetime/po-timezones/Makefile.am     |    2 +-
 panels/datetime/po-timezones/meson.build     |   73 +++++
 panels/display/Makefile.am                   |    2 +-
 panels/display/icons/meson.build             |   18 ++
 panels/display/meson.build                   |   67 +++++
 panels/info/Makefile.am                      |    2 +-
 panels/info/meson.build                      |   92 ++++++
 panels/keyboard/Makefile.am                  |    3 +-
 panels/keyboard/meson.build                  |  104 +++++++
 panels/meson.build                           |   44 +++
 panels/mouse/Makefile.am                     |    2 +-
 panels/mouse/meson.build                     |   72 +++++
 panels/network/Makefile.am                   |    2 +-
 panels/network/connection-editor/Makefile.am |    2 +-
 panels/network/connection-editor/meson.build |   56 ++++
 panels/network/meson.build                   |   79 +++++
 panels/network/wireless-security/Makefile.am |    2 +-
 panels/network/wireless-security/meson.build |   55 ++++
 panels/notifications/Makefile.am             |    2 +-
 panels/notifications/meson.build             |   46 +++
 panels/online-accounts/Makefile.am           |    2 +-
 panels/online-accounts/icons/Makefile.am     |    2 +
 panels/online-accounts/icons/meson.build     |   15 +
 panels/online-accounts/meson.build           |   48 +++
 panels/power/Makefile.am                     |    2 +-
 panels/power/icons/Makefile.am               |    2 +
 panels/power/icons/meson.build               |   15 +
 panels/power/meson.build                     |   55 ++++
 panels/printers/Makefile.am                  |    2 +-
 panels/printers/meson.build                  |   99 +++++++
 panels/privacy/Makefile.am                   |    2 +-
 panels/privacy/meson.build                   |   40 +++
 panels/region/Makefile.am                    |    2 +-
 panels/region/meson.build                    |   60 ++++
 panels/search/Makefile.am                    |    2 +-
 panels/search/meson.build                    |   49 +++
 panels/sharing/Makefile.am                   |    2 +-
 panels/sharing/meson.build                   |  100 +++++++
 panels/sound/Makefile.am                     |    3 +
 panels/sound/data/icons/Makefile.am          |    2 +
 panels/sound/data/icons/meson.build          |   69 +++++
 panels/sound/data/sounds/Makefile.am         |    2 +-
 panels/sound/data/sounds/meson.build         |   31 ++
 panels/sound/data/symbolic-icons/Makefile.am |    1 +
 panels/sound/data/symbolic-icons/meson.build |   13 +
 panels/sound/meson.build                     |   67 +++++
 panels/universal-access/Makefile.am          |    2 +-
 panels/universal-access/meson.build          |   53 ++++
 panels/user-accounts/Makefile.am             |    1 +
 panels/user-accounts/meson.build             |  171 +++++++++++
 panels/wacom/Makefile.am                     |    2 +-
 panels/wacom/calibrator/Makefile.am          |    2 +
 panels/wacom/calibrator/meson.build          |   36 +++
 panels/wacom/meson.build                     |  108 +++++++
 po/meson.build                               |    1 +
 search-provider/Makefile.am                  |    2 +-
 search-provider/meson.build                  |   50 ++++
 shell/Makefile.am                            |    4 +-
 shell/alt/Makefile.am                        |    2 +
 shell/alt/meson.build                        |   14 +
 shell/appdata/Makefile.am                    |    4 +-
 shell/appdata/meson.build                    |   10 +
 shell/completions/meson.build                |   10 +
 shell/meson.build                            |  176 +++++++++++
 subprojects/gvc                              |    2 +-
 subprojects/libgd                            |    2 +-
 86 files changed, 3082 insertions(+), 31 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 500bff5..a2ba371 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,7 +27,11 @@ MAINTAINERCLEANFILES = \
        `find "$(srcdir)" -type f -name Makefile.in -print`
 
 EXTRA_DIST = \
-       MAINTAINERS
+       MAINTAINERS \
+       meson.build \
+       meson_options.txt \
+       meson_post_install.py \
+       po/meson.build
 
 AM_DISTCHECK_CONFIGURE_FLAGS = --disable-update-mimedb --enable-gtk-doc --disable-maintainer-mode
 
diff --git a/man/Makefile.am b/man/Makefile.am
index 7f651fb..440e4d3 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -14,7 +14,9 @@ man_MANS = \
 
 xml_files = $(man_MANS:.1=.xml)
 
-EXTRA_DIST = $(xml_files)
+EXTRA_DIST = \
+       $(xml_files) \
+       meson.build
 
 DISTCLEANFILES = $(man_MANS)
 
diff --git a/man/meson.build b/man/meson.build
new file mode 100644
index 0000000..cab3fa9
--- /dev/null
+++ b/man/meson.build
@@ -0,0 +1,26 @@
+xsltproc = find_program('xsltproc', required: false)
+assert(xsltproc.found(), 'xsltproc is required to build documentation')
+
+xsltproc_cmd = [
+  xsltproc,
+  '--output', '@OUTPUT@',
+  '--nonet',
+  '--stringparam', 'man.output.quietly', '1',
+  '--stringparam', 'funcsynopsis.style', 'ansi',
+  '--stringparam', 'man.th.extra1.suppress', '1',
+  '--stringparam', 'man.authors.section.enabled', '0',
+  '--stringparam', 'man.copyright.section.enabled', '0',
+  'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
+  '@INPUT@'
+]
+
+output = meson.project_name() + '.1'
+
+custom_target(
+  output,
+  input: meson.project_name() + '.xml',
+  output: output,
+  command: xsltproc_cmd,
+  install: true,
+  install_dir: join_paths(control_center_mandir, 'man1')
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..3bd6e30
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,409 @@
+project(
+  'gnome-control-center', 'c',
+  version: '3.26.0',
+  license: 'GPL2',
+  default_options: [
+    'buildtype=debugoptimized',
+    'warning_level=1'
+  ],
+  meson_version: '>= 0.43.0'
+)
+
+control_center_version = meson.project_version()
+
+control_center_api_version = '2.0'
+control_center_api_name = '@0@-@1@'.format(meson.project_name(), control_center_api_version)
+
+control_center_prefix = get_option('prefix')
+control_center_bindir = join_paths(control_center_prefix, get_option('bindir'))
+control_center_datadir = join_paths(control_center_prefix, get_option('datadir'))
+control_center_libexecdir = join_paths(control_center_prefix, get_option('libexecdir'))
+control_center_localedir = join_paths(control_center_prefix, get_option('localedir'))
+control_center_mandir = join_paths(control_center_prefix, get_option('mandir'))
+control_center_sysconfdir = join_paths(control_center_prefix, get_option('sysconfdir'))
+
+control_center_pkgdatadir = join_paths(control_center_datadir, meson.project_name())
+
+control_center_desktopdir = join_paths(control_center_datadir, 'applications')
+
+control_center_buildtype = get_option('buildtype')
+control_center_debug = control_center_buildtype.contains('debug')
+
+host_is_linux = host_machine.system().contains('linux')
+host_is_s390 = host_machine.cpu().contains('s390')
+
+cc = meson.get_compiler('c')
+
+config_h = configuration_data()
+
+# defines
+set_defines = [
+  # package
+  ['PACKAGE', meson.project_name()],
+  ['PACKAGE_BUGREPORT', 'http://bugzilla.gnome.org/enter_bug.cgi?product=' + meson.project_name()],
+  ['PACKAGE_NAME', meson.project_name()],
+  ['PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), control_center_version)],
+  ['PACKAGE_TARNAME', meson.project_name()],
+  ['PACKAGE_URL', ''],
+  ['PACKAGE_VERSION', control_center_version],
+  ['VERSION', control_center_version],
+  # i18n
+  ['GETTEXT_PACKAGE', control_center_api_name]
+]
+
+foreach define: set_defines
+  config_h.set_quoted(define[0], define[1])
+endforeach
+
+# debug
+config_h.set('NDEBUG', not control_center_debug)
+config_h.set('GNOME_ENABLE_DEBUG', control_center_debug)
+
+config_h.set('USER_DIR_MODE', 0700,
+             description: 'Permissions for creating the user\'s config, cache and data directories')
+
+# headers
+check_headers = [
+  ['HAVE_DLFCN_H', 'dlfcn.h'],
+  ['HAVE_INTTYPES_H', 'inttypes.h'],
+  ['HAVE_MEMORY_H', 'memory.h'],
+  ['HAVE_STDINT_H', 'stdint.h'],
+  ['HAVE_STDLIB_H', 'stdlib.h'],
+  ['HAVE_STRINGS_H', 'strings.h'],
+  ['HAVE_STRING_H', 'string.h'],
+  ['HAVE_SYS_STAT_H', 'sys/stat.h'],
+  ['HAVE_SYS_TYPES_H', 'sys/types.h'],
+  ['HAVE_UNISTD_H', 'unistd.h']
+]
+
+foreach header: check_headers
+  config_h.set(header[0], cc.has_header(header[1]))
+endforeach
+
+# functions
+check_functions = [
+  # i18n
+  ['HAVE_DCGETTEXT', 'dcgettext'],
+  ['HAVE_GETTEXT', 'gettext']
+]
+
+foreach func: check_functions
+  config_h.set(func[0], cc.has_function(func[1]))
+endforeach
+
+# compiler flags
+common_flags = ['-DHAVE_CONFIG_H']
+
+# Only add this when optimizing is enabled (default)
+optimized_src = '''
+  #if __OPTIMIZE__ == 0
+  #error No optimization
+  #endif
+'''
+
+control_center_optimized = control_center_buildtype.contains('optimized') and cc.compiles(optimized_src)
+message('whether_optimization is enabled: ' + control_center_optimized.to_string())
+
+if control_center_optimized
+  common_flags += '-Wp,-D_FORTIFY_SOURCE=2'
+endif
+
+if control_center_debug
+  test_flags = [
+    '-Wcast-align',
+    '-Wmissing-field-initializers',
+    '-Wmissing-declarations',
+    '-Wmissing-prototypes',
+    '-Wnested-externs',
+    '-Wno-strict-aliasing',
+    '-Wno-sign-compare'
+  ]
+
+  foreach flag: test_flags
+    if cc.has_argument(flag)
+      common_flags += [flag]
+    endif
+  endforeach
+endif
+
+add_project_arguments(common_flags, language: 'c')
+
+# Check that we meet the  dependencies
+libgvc = subproject(
+  'gvc',
+  default_options: 'static=true'
+)
+libgvc_dep = libgvc.get_variable('libgvc_dep')
+
+libgd = subproject(
+  'libgd',
+  default_options: [
+    'static=true',
+    'with-view-common=true',
+    'with-main-view=true'
+  ]
+)
+libgd_dep = libgd.get_variable('libgd_dep')
+
+goa_req_version = '>= 3.25.3'
+pulse_req_version = '>= 2.0'
+
+accounts_dep = dependency('accountsservice', version: '>= 0.6.39')
+clutter_gtk_dep = dependency('clutter-gtk-1.0', required: false)
+colord_dep = dependency('colord', version: '>= 0.1.34')
+gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.23.0')
+gio_dep = dependency('gio-2.0')
+glib_dep = dependency('glib-2.0', version: '>= 2.53.0')
+gnome_desktop_dep = dependency('gnome-desktop-3.0', version: '>= 3.1.0')
+gnome_settings_dep = dependency('gnome-settings-daemon', version: '>= 3.25.90')
+goa_dep = dependency('goa-1.0', version: goa_req_version)
+gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 3.21.4')
+libxml_dep = dependency('libxml-2.0')
+polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.103')
+pulse_dep = dependency('libpulse', version: pulse_req_version)
+pulse_mainloop_dep = dependency('libpulse-mainloop-glib', version: pulse_req_version)
+upower_glib_dep = dependency('upower-glib', version: '>= 0.99.0')
+x11_dep = dependency('x11')
+xi_dep = dependency('xi', version: '>= 1.2')
+
+m_dep = cc.find_library('m')
+
+common_deps = [
+  gio_dep,
+  glib_dep,
+  gsettings_desktop_dep,
+  dependency('gio-unix-2.0'),
+  dependency('gthread-2.0'),
+  dependency('gtk+-3.0', version: '>= 3.22.0')
+]
+
+# x11 headers
+xf86misc_dep = dependency('Xxf86misc', required: false)
+if xf86misc_dep.found() and cc.has_function('XF86MiscQueryExtension', dependencies: xf86misc_dep)
+  has_header = cc.has_header('X11/extensions/xf86misc.h', dependencies: xf86misc_dep)
+  config_h.set('HAVE_X11_EXTENSIONS_XF86MISC_H', has_header)
+endif
+
+check_headers = [
+  ['HAVE_X11_EXTENSIONS_XKB_H', 'X11/extensions/XKB.h'],
+  ['HAVE_X11_XLIB_H', 'X11/Xlib.h']
+]
+
+foreach header: check_headers
+  config_h.set(header[0], cc.has_header(header[1], dependencies: x11_dep))
+endforeach
+
+# udev
+udev_dep = dependency('gudev-1.0', required: false)
+have_udep = udev_dep.found()
+
+config_h.set('HAVE_UDEV', have_udep,
+             description: ' System has udev')
+
+# network manager
+libnm_dep = dependency('libnm', version: '>= 1.2.0', required: false)
+libnma_dep = dependency('libnma', version: '>= 1.2.0', required: false)
+mm_glib_dep = dependency('mm-glib', version: '>= 0.7', required: false)
+have_network_manager = libnm_dep.found() and libnma_dep.found() and mm_glib_dep.found()
+
+if have_network_manager
+  network_manager_dep = dependency('NetworkManager')
+  nm_vpn_config_dir = join_paths(network_manager_dep.get_pkgconfig_variable('configdir'), 'VPN')
+  nm_vpn_module_dir = network_manager_dep.get_pkgconfig_variable('plugindir')
+else
+  error_str = '*** Network panel will not be built (NetworkManager or ModemManager not found) ***'
+  if host_is_linux
+    error(error_str)
+  endif
+  message(error_str)
+endif
+
+config_h.set('BUILD_NETWORK', have_network_manager,
+             description: 'Define to 1 to build the Network panel')
+config_h.set('HAVE_NETWORK_MANAGER', have_network_manager,
+             description: 'Define to 1 if NetworkManager is available')
+
+network_manager_deps = [
+  libnm_dep,
+  libnma_dep,
+  mm_glib_dep
+]
+
+# Check for gnome-bluetooth
+gnome_bluetooth_dep = dependency('gnome-bluetooth-1.0', version: '>= 3.18.2', required: false)
+have_bluetooth = gnome_bluetooth_dep.found()
+
+if not have_bluetooth
+  error_str = '*** Bluetooth panel will not be built'
+  if host_is_linux
+    if not host_is_s390
+      error(error_str + ' ***')
+    endif
+    message(error_str + ' (no USB support on this platform) ***')
+  else
+    message(error_str + ' ***')
+  endif
+endif
+
+config_h.set('BUILD_BLUETOOTH', have_bluetooth,
+             description: 'Define to 1 to build the Bluetooth panel')
+config_h.set('HAVE_BLUETOOTH', have_bluetooth,
+             description: 'Define to 1 if bluetooth support is available')
+
+# Check for CUPS 1.4 or newer
+cups_dep = dependency('cups', version : '>= 1.4', required: false)
+assert(cups_dep.found(), 'CUPS 1.4 or newer not found')
+
+# https://bugzilla.gnome.org/show_bug.cgi?id=696766
+cups_cflags = []
+# FIXME: This produces a lot of errors
+'''
+if cups_dep.version().version_compare('>= 1.6')
+  cups_cflags += '-D_PPD_DEPRECATED=""'
+endif
+'''
+
+# cups headers
+check_headers = [
+  ['HAVE_CUPS_CUPS_H', 'cups/cups.h'],
+  ['HAVE_CUPS_HTTP_H', 'cups/http.h'],
+  ['HAVE_CUPS_IPP_H', 'cups/ipp.h'],
+  ['HAVE_CUPS_PPD_H', 'cups/ppd.h']
+]
+
+foreach header: check_headers
+  has_header = cc.has_header(header[1], args: cups_cflags)
+  assert(has_header, 'CUPS headers not found: ' + header[1])
+  config_h.set(header[0], has_header)
+endforeach
+
+# Optional dependency for the user accounts panel
+have_cheese = false
+enable_cheese = get_option('enable-cheese')
+if enable_cheese != 'no'
+  cheese_gtk_dep = dependency('cheese-gtk', version: '>= 3.5.91', required: false)
+  cheese_dep = dependency('cheese', required: false)
+  have_cheese = cheese_gtk_dep.found() and cheese_dep.found() and clutter_gtk_dep.found()
+
+  if have_cheese
+    cheese_deps = [
+      cheese_gtk_dep,
+      cheese_dep,
+      clutter_gtk_dep
+    ]
+  else
+    error_str = 'Cheese configured but not found'
+    if enable_cheese == 'yes'
+      error(error_str)
+    endif
+    message(error_str)
+  endif
+endif
+
+config_h.set('HAVE_CHEESE', have_cheese,
+             description: 'Define to 1 to enable cheese webcam support')
+
+# Wacom
+clutter_dep = dependency('clutter-1.0', version: '>= 1.11.3', required: false)
+libwacom_dep = dependency('libwacom', version: '>= 0.7', required: false)
+have_wacom = clutter_dep.found() and clutter_gtk_dep.found() and libwacom_dep.found()
+
+if not have_wacom
+  error_str = '*** Wacom panel will not be built'
+  if host_is_linux
+    if not host_is_s390
+      error(error_str + ' ***')
+    endif
+    message(error_str + ' (no USB support on this platform) ***')
+  else
+    message(error_str + ' ***')
+  endif
+endif
+
+config_h.set('BUILD_WACOM', have_wacom,
+             description: 'Define to 1 to build the Wacom panel')
+config_h.set('HAVE_WACOM', have_wacom,
+             description: 'Define to 1 is Wacom is supportted')
+
+# Check for info panel
+gnome_session_libexecdir = get_option('with-gnome-session-libexecdir').strip()
+if gnome_session_libexecdir == ''
+  gnome_session_libexecdir = control_center_libexecdir
+endif
+
+# IBus support
+enable_ibus = get_option('enable-ibus')
+config_h.set('HAVE_IBUS', enable_ibus,
+             description: 'Defined if IBus support is enabled')
+
+configure_file(
+  output: 'config.h',
+  configuration: config_h
+)
+
+gnome = import('gnome')
+i18n = import('i18n')
+pkg = import('pkgconfig')
+
+desktop_conf = configuration_data()
+desktop_conf.set('VERSION', control_center_version)
+
+po_dir = join_paths(meson.source_root(), 'po')
+
+intltool_merge = find_program('intltool-merge')
+intltool_cache = join_paths(po_dir, '.intltool-merge-cache')
+intltool_desktop_cmd = [intltool_merge, '-d', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+intltool_xml_cmd = [intltool_merge, '-x', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+
+top_inc = include_directories('.')
+shell_inc = include_directories('shell')
+
+subdir('po')
+subdir('panels')
+subdir('shell')
+subdir('search-provider')
+
+if get_option('enable-documentation')
+  subdir('man')
+endif
+
+meson.add_install_script(
+  'meson_post_install.py',
+  control_center_datadir
+)
+
+output = meson.project_name() + ' was configured with the following options:\n'
+
+if have_network_manager
+  output += '** NetworkManager (Network panel)\n'
+else
+  output += '   Network panel disabled\n'
+endif
+
+if have_bluetooth
+  output += '** gnome-bluetooth (Bluetooth panel)\n'
+else
+  output += '   Bluetooth panel disabled\n'
+endif
+
+if have_cheese
+  output += '** Cheese (Users panel webcam support)\n'
+else
+  output += '   Users panel webcam support disabled\n'
+endif
+
+if have_wacom
+  output += '** wacom (Wacom tablet panel)\n'
+else
+  output += '   Wacom panel disabled\n'
+endif
+
+if enable_ibus
+  output += '** IBus (Region panel IBus support)\n'
+else
+  output += '  Region panel IBus support disabled\n'
+endif
+
+output += '** gnome-session libexecdir: ' + gnome_session_libexecdir + '\n'
+output += 'End options'
+message(output)
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..36a6870
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,5 @@
+option('enable-cheese', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'enable 
cheese webcam support')
+option('enable-ibus', type: 'boolean', value: true, description: 'Disable IBus support')
+option('with-gnome-session-libexecdir', type: 'string', value: '', description: 'Directory for gnome-session 
s libexecdir')
+option('enable-documentation', type: 'boolean', value: false, description: 'build documentation')
+option('enable-update-mimedb', type: 'boolean', value: true, description: 'update-mime-database after 
install')
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 0000000..3c0eb2f
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+import sys
+
+if not os.environ.get('DESTDIR'):
+  icondir = os.path.join(sys.argv[1], 'icons', 'hicolor')
+  print('Update icon cache...')
+  subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
diff --git a/panels/Makefile.am b/panels/Makefile.am
index 507cd2f..b5d9534 100644
--- a/panels/Makefile.am
+++ b/panels/Makefile.am
@@ -31,4 +31,6 @@ if BUILD_BLUETOOTH
 SUBDIRS += bluetooth
 endif
 
+EXTRA_DIST = meson.build
+
 -include $(top_srcdir)/git.mk
diff --git a/panels/background/Makefile.am b/panels/background/Makefile.am
index ccb8017..c06503e 100644
--- a/panels/background/Makefile.am
+++ b/panels/background/Makefile.am
@@ -95,6 +95,6 @@ desktop_in_files = gnome-background-panel.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES) stamp-gdesktop-enums-types.h
-EXTRA_DIST = $(resource_files) background.gresource.xml
+EXTRA_DIST = $(resource_files) background.gresource.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/background/meson.build b/panels/background/meson.build
new file mode 100644
index 0000000..ecb27e0
--- /dev/null
+++ b/panels/background/meson.build
@@ -0,0 +1,128 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+install_data(
+  'slideshow-symbolic.svg',
+  install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'categories')
+)
+
+install_data(
+  'slideshow-emblem.svg',
+  install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'emblems')
+)
+
+install_data(
+  'noise-texture-light.png',
+  install_dir: join_paths(control_center_pkgdatadir, 'pixmaps')
+)
+
+common_sources = []
+
+gdesktop_prefix = gsettings_desktop_dep.get_pkgconfig_variable('prefix')
+
+enums = 'gdesktop-enums-types'
+enums_header = files(
+  gdesktop_prefix + '/include/gsettings-desktop-schemas/gdesktop-enums.h',
+  'cc-background-item.h'
+)
+
+common_sources += gnome.mkenums(
+  enums + '.h',
+  sources: enums_header,
+  fhead: '#ifndef __GDESKTOP_ENUMS_TYPES_H__\n#define __GDESKTOP_ENUMS_TYPES_H__\n\n#include 
<glib-object.h>\n\nG_BEGIN_DECLS\n',
+  fprod: '/* enumerations from "@filename@" */\n',
+  vhead: 'GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define G_DESKTOP_TYPE_@ENUMSHORT@ 
(@enum_name@_get_type())\n',
+  ftail: 'G_END_DECLS\n\n#endif /* __GDESKTOP_ENUMS_TYPES_H__ */'
+)
+
+common_sources += gnome.mkenums(
+  enums + '.c',
+  sources: enums_header,
+  fhead: '#include <gdesktop-enums.h>\n#include "gdesktop-enums-types.h"\n#include "cc-background-item.h"',
+  fprod: '\n/* enumerations from "@filename@" */',
+  vhead: 'GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static 
const G@Type@Value values[] = {',
+  vprod: '      { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
+  vtail: '      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static ("@EnumName@", values);\n  
}\n  return etype;\n}\n'
+)
+
+resource_data = files('background.ui')
+
+common_sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+sources = common_sources + files(
+  'bg-colors-source.c',
+  'bg-pictures-source.c',
+  'bg-source.c',
+  'bg-wallpapers-source.c',
+  'cc-background-chooser-dialog.c',
+  'cc-background-grilo-miner.c',
+  'cc-background-item.c',
+  'cc-background-xml.c'
+)
+
+deps = common_deps + [
+  gdk_pixbuf_dep,
+  gnome_desktop_dep,
+  goa_dep,
+  libxml_dep,
+  dependency('cairo-gobject'),
+  dependency('grilo-0.3', version: '>= 0.3.0')
+]
+
+cflags = [
+  '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir),
+  '-DDATADIR="@0@"'.format(control_center_datadir),
+  '-DGNOME_DESKTOP_USE_UNSTABLE_API'
+]
+
+libbackground_chooser = static_library(
+  cappletname + '-chooser',
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags
+)
+
+sources = common_sources + files('cc-' + cappletname + '-panel.c')
+
+libbackground = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags,
+  link_with: libbackground_chooser
+)
+
+test_name = 'test-chooser-dialog'
+
+executable(
+  test_name,
+  test_name + '.c',
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags,
+  link_with: libbackground_chooser
+)
diff --git a/panels/bluetooth/Makefile.am b/panels/bluetooth/Makefile.am
index 9117fc2..2598470 100644
--- a/panels/bluetooth/Makefile.am
+++ b/panels/bluetooth/Makefile.am
@@ -33,6 +33,6 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
 CLEANFILES = $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(man_MANS) $(desktop_in_in_files) $(resource_files) bluetooth.gresource.xml
+EXTRA_DIST = $(man_MANS) $(desktop_in_in_files) $(resource_files) bluetooth.gresource.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/bluetooth/meson.build b/panels/bluetooth/meson.build
new file mode 100644
index 0000000..f8a2e5e
--- /dev/null
+++ b/panels/bluetooth/meson.build
@@ -0,0 +1,42 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+sources = files('cc-' + cappletname + '-panel.c')
+
+resource_data = files('bluetooth.ui')
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+deps = common_deps + [gnome_bluetooth_dep]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libbluetooth = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags
+)
diff --git a/panels/color/Makefile.am b/panels/color/Makefile.am
index a003f8a..bb670ed 100644
--- a/panels/color/Makefile.am
+++ b/panels/color/Makefile.am
@@ -45,6 +45,6 @@ desktop_in_files = gnome-color-panel.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) color.gresource.xml
+EXTRA_DIST = $(resource_files) color.gresource.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/color/icons/Makefile.am b/panels/color/icons/Makefile.am
index c000933..9f51a77 100644
--- a/panels/color/icons/Makefile.am
+++ b/panels/color/icons/Makefile.am
@@ -1,5 +1,7 @@
 SUBDIRS = scalable 16x16 22x22 24x24 32x32 48x48 64x64 256x256
 
+EXTRA_DIST = meson.build
+
 if MAINTAINER_MODE
 
 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(pkgdatadir)/icons/hicolor
diff --git a/panels/color/icons/meson.build b/panels/color/icons/meson.build
new file mode 100644
index 0000000..da2e7e2
--- /dev/null
+++ b/panels/color/icons/meson.build
@@ -0,0 +1,21 @@
+icon_sizes = [
+  '16x16',
+  '22x22',
+  '24x24',
+  '32x32',
+  '48x48',
+  '64x64',
+  '256x256'
+]
+
+foreach icon_size: icon_sizes
+  install_data(
+    join_paths(icon_size, 'preferences-color.png'),
+    install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+  )
+endforeach
+
+install_data(
+  'scalable/preferences-color.svg',
+  install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'apps')
+)
diff --git a/panels/color/meson.build b/panels/color/meson.build
new file mode 100644
index 0000000..05f15f0
--- /dev/null
+++ b/panels/color/meson.build
@@ -0,0 +1,63 @@
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+sources = files(
+  'cc-' + cappletname + '-panel.c',
+  'cc-color-calibrate.c',
+  'cc-color-cell-renderer-text.c',
+  'cc-color-common.c',
+  'cc-color-device.c',
+  'cc-color-profile.c'
+)
+
+resource_data = files(
+  'color-calibrate.ui',
+  'color.ui'
+)
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+deps = common_deps + [
+  colord_dep,
+  gnome_desktop_dep,
+  m_dep,
+  dependency('colord-gtk', version: '>= 0.1.24'),
+  dependency('libsoup-2.4')
+]
+
+cflags = [
+  '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir),
+  '-DBINDIR="@0@"'.format(control_center_bindir)
+]
+
+libcolor = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags
+)
diff --git a/panels/common/Makefile.am b/panels/common/Makefile.am
index 7d0eaad..26da17c 100644
--- a/panels/common/Makefile.am
+++ b/panels/common/Makefile.am
@@ -79,7 +79,7 @@ cc-common-resources.h: common.gresource.xml $(resource_files)
 rulesdir = $(datadir)/polkit-1/rules.d/
 rules_DATA = gnome-control-center.rules
 
-EXTRA_DIST = $(rules_DATA) $(resource_files) common.gresource.xml
+EXTRA_DIST = $(rules_DATA) $(resource_files) common.gresource.xml meson.build
 CLEANFILES = $(BUILT_SOURCES) $(GSD_COMMON_ENUM_FILES)
 
 INPUTDIR=$(top_srcdir)/../gnome-settings-daemon/plugins/common/
diff --git a/panels/common/meson.build b/panels/common/meson.build
new file mode 100644
index 0000000..6289be9
--- /dev/null
+++ b/panels/common/meson.build
@@ -0,0 +1,83 @@
+common_inc = include_directories('.')
+
+common_sources = []
+
+enums = 'gsd-common-enums'
+enums_header = files('gsd-device-manager.h')
+
+common_sources += gnome.mkenums(
+  enums + '.h',
+  sources: enums_header,
+  fhead: '#ifndef GSD_COMMON_ENUMS_H\n#define GSD_COMMON_ENUMS_H\n\n#include 
<glib-object.h>\n\nG_BEGIN_DECLS\n',
+  fprod: '/* enumerations from "@filename@" */\n',
+  vhead: 'GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GSD_TYPE_@ENUMSHORT@ 
(@enum_name@_get_type())\n',
+  ftail: 'G_END_DECLS\n\n#endif /* !GSD_COMMON_ENUMS_H */'
+)
+
+common_sources += gnome.mkenums(
+  enums + '.c',
+  sources: enums_header,
+  fhead: '#include "gsd-device-manager.h"\n#include "gsd-common-enums.h"\n',
+  fprod: '\n/* enumerations from "@filename@" */',
+  vhead: 'GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static 
const G@Type@Value values[] = {',
+  vprod: '      { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
+  vtail: '      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static ("@EnumName@", values);\n  
}\n  return etype;\n}\n'
+)
+
+sources = common_sources + files(
+  'cc-common-language.c',
+  'cc-language-chooser.c',
+  'cc-util.c'
+)
+
+resource_data = files('language-chooser.ui')
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+deps = common_deps + [
+  gnome_desktop_dep,
+  dependency('fontconfig')
+]
+
+liblanguage = static_library(
+  'language',
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: deps
+)
+
+sources = common_sources + files(
+  'gsd-device-manager.c',
+  'gsd-device-manager-x11.c',
+  'gsd-input-helper.c'
+)
+
+deps = common_deps
+
+if have_udep
+  sources += files('gsd-device-manager-udev.c')
+
+  deps += [
+    udev_dep,
+    dependency('gdk-wayland-3.0', required: false)
+  ]
+endif
+
+libdevice = static_library(
+  'device',
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: deps
+)
+
+install_data(
+  'gnome-control-center.rules',
+  install_dir: join_paths(control_center_datadir, 'polkit-1', 'rules.d')
+)
diff --git a/panels/datetime/Makefile.am b/panels/datetime/Makefile.am
index a003f0b..9a5f509 100644
--- a/panels/datetime/Makefile.am
+++ b/panels/datetime/Makefile.am
@@ -109,6 +109,8 @@ EXTRA_DIST =                                \
        timedated1-interface.xml        \
        $(polkit_in_files)              \
        $(resource_files)               \
-       datetime.gresource.xml
+       datetime.gresource.xml          \
+       meson.build                     \
+       icons/meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/datetime/icons/meson.build b/panels/datetime/icons/meson.build
new file mode 100644
index 0000000..f8f0cf1
--- /dev/null
+++ b/panels/datetime/icons/meson.build
@@ -0,0 +1,19 @@
+icon_sizes = [
+  '16x16',
+  '22x22',
+  '32x32',
+  '48x48',
+  '256x256'
+]
+
+foreach icon_size: icon_sizes
+  install_data(
+    join_paths(icon_size, 'preferences-system-time.png'),
+    install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+  )
+endforeach
+
+install_data(
+  'scalable/preferences-system-time.svg',
+  install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'apps')
+)
diff --git a/panels/datetime/meson.build b/panels/datetime/meson.build
new file mode 100644
index 0000000..6b57d8b
--- /dev/null
+++ b/panels/datetime/meson.build
@@ -0,0 +1,217 @@
+subdir('po-timezones')
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+polkit = 'org.gnome.controlcenter.' + cappletname + '.policy'
+
+custom_target(
+  polkit,
+  input: polkit + '.in',
+  output: polkit,
+  command: intltool_xml_cmd,
+  install: true,
+  install_dir: join_paths(control_center_datadir, 'polkit-1', 'actions')
+)
+
+resource_data = files(
+  'data/bg_dim.png',
+  'data/bg.png',
+  'data/cc.png',
+  'data/pin.png',
+  'data/timezone_0_dim.png',
+  'data/timezone_0.png',
+  'data/timezone_10.5_dim.png',
+  'data/timezone_10.5.png',
+  'data/timezone_-10_dim.png',
+  'data/timezone_10_dim.png',
+  'data/timezone_-10.png',
+  'data/timezone_10.png',
+  'data/timezone_11.5_dim.png',
+  'data/timezone_11.5.png',
+  'data/timezone_-11_dim.png',
+  'data/timezone_11_dim.png',
+  'data/timezone_-11.png',
+  'data/timezone_11.png',
+  'data/timezone_12.75_dim.png',
+  'data/timezone_12.75.png',
+  'data/timezone_12_dim.png',
+  'data/timezone_12.png',
+  'data/timezone_13_dim.png',
+  'data/timezone_13.png',
+  'data/timezone_14_dim.png',
+  'data/timezone_14.png',
+  'data/timezone_-1_dim.png',
+  'data/timezone_1_dim.png',
+  'data/timezone_-1.png',
+  'data/timezone_1.png',
+  'data/timezone_-2_dim.png',
+  'data/timezone_2_dim.png',
+  'data/timezone_-2.png',
+  'data/timezone_2.png',
+  'data/timezone_-3.5_dim.png',
+  'data/timezone_3.5_dim.png',
+  'data/timezone_-3.5.png',
+  'data/timezone_3.5.png',
+  'data/timezone_-3_dim.png',
+  'data/timezone_3_dim.png',
+  'data/timezone_-3.png',
+  'data/timezone_3.png',
+  'data/timezone_-4.5_dim.png',
+  'data/timezone_4.5_dim.png',
+  'data/timezone_-4.5.png',
+  'data/timezone_4.5.png',
+  'data/timezone_-4_dim.png',
+  'data/timezone_4_dim.png',
+  'data/timezone_-4.png',
+  'data/timezone_4.png',
+  'data/timezone_-5.5_dim.png',
+  'data/timezone_5.5_dim.png',
+  'data/timezone_-5.5.png',
+  'data/timezone_5.5.png',
+  'data/timezone_5.75_dim.png',
+  'data/timezone_5.75.png',
+  'data/timezone_-5_dim.png',
+  'data/timezone_5_dim.png',
+  'data/timezone_-5.png',
+  'data/timezone_5.png',
+  'data/timezone_6.5_dim.png',
+  'data/timezone_6.5.png',
+  'data/timezone_-6_dim.png',
+  'data/timezone_6_dim.png',
+  'data/timezone_-6.png',
+  'data/timezone_6.png',
+  'data/timezone_-7_dim.png',
+  'data/timezone_7_dim.png',
+  'data/timezone_-7.png',
+  'data/timezone_7.png',
+  'data/timezone_8.5_dim.png',
+  'data/timezone_8.5.png',
+  'data/timezone_8.75_dim.png',
+  'data/timezone_8.75.png',
+  'data/timezone_-8_dim.png',
+  'data/timezone_8_dim.png',
+  'data/timezone_-8.png',
+  'data/timezone_8.png',
+  'data/timezone_-9.5_dim.png',
+  'data/timezone_9.5_dim.png',
+  'data/timezone_-9.5.png',
+  'data/timezone_9.5.png',
+  'data/timezone_-9_dim.png',
+  'data/timezone_9_dim.png',
+  'data/timezone_-9.png',
+  'data/timezone_9.png',
+  'backward',
+  'big.ui',
+  'datetime.ui',
+  'little.ui',
+  'middle.ui',
+  'ydm.ui'
+)
+
+resources = gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+sources = files(
+  'cc-' + cappletname + '-panel.c',
+  'cc-timezone-map.c',
+  'date-endian.c',
+  'tz.c'
+)
+
+gdbus = 'timedated'
+gdbus_iface_xml = gdbus + '1-interface.xml'
+
+# This requires running d-bus session and accessible timedate1 daemon
+# FIXME: need to find a way how to filter out unnecessary d-bus stuff (introspectable, properties)
+#timedated1-interface.xml:
+# gdbus introspect          \
+#   --xml           \
+#   --system          \
+#   --dest org.freedesktop.timedate1    \
+#   --object-path /org/freedesktop/timedate1  \
+#    > timedated1-interface.xml
+'''
+gdbus_iface = custom_target(
+  gdbus_iface_xml,
+  output: gdbus_iface_xml,
+  capture: true,
+  command: [
+    find_program('gdbus'),
+    'introspect',
+    '--xml',
+    '--system',
+    '--dest', 'org.freedesktop.timedate1',
+    '--object-path', '/org/freedesktop/timedate1'
+  ],
+)
+'''
+
+sources += gnome.gdbus_codegen(
+  gdbus,
+  gdbus_iface_xml,
+  interface_prefix: 'org.freedesktop.'
+)
+
+deps = common_deps + [
+  gdk_pixbuf_dep,
+  gnome_desktop_dep,
+  polkit_gobject_dep
+]
+
+cflags = [
+  '-DGNOMECC_DATA_DIR="@0@"'.format(control_center_pkgdatadir),
+  '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+libdatetime = static_library(
+  cappletname,
+  sources: sources + resources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags
+)
+
+test_cflags = '-DSRCDIR="@0@"'.format(meson.current_source_dir())
+
+test_units = [
+  # test name, test name + '.c' + extra_sources, extra_deps, extra cflags
+  # FIXME: The test does not work due to missing timezones
+  #['test-timezone', ['cc-timezone-map.c', 'tz.c'] + resources, [m_dep], []],
+  ['test-timezone-gfx', ['tz.c'] + resources, [m_dep], [test_cflags]],
+  ['test-endianess', ['date-endian.c'], [], []]
+]
+
+foreach unit: test_units
+  exe = executable(
+    unit[0],
+    [unit[0] + '.c'] + unit[1],
+    include_directories: top_inc,
+    dependencies: deps + unit[2],
+    c_args: cflags + unit[3]
+  )
+
+  test(unit[0], exe)
+endforeach
diff --git a/panels/datetime/po-timezones/Makefile.am b/panels/datetime/po-timezones/Makefile.am
index b508d21..cb56b48 100644
--- a/panels/datetime/po-timezones/Makefile.am
+++ b/panels/datetime/po-timezones/Makefile.am
@@ -28,7 +28,7 @@ install: $(CATALOGS)
                fi; \
        done
 
-EXTRA_DIST=$(wildcard *.po)
+EXTRA_DIST=$(wildcard *.po) meson.build
 
 CLEANFILES = $(ALL_CATALOGS)
 
diff --git a/panels/datetime/po-timezones/meson.build b/panels/datetime/po-timezones/meson.build
new file mode 100644
index 0000000..dca8638
--- /dev/null
+++ b/panels/datetime/po-timezones/meson.build
@@ -0,0 +1,73 @@
+linguas = [
+  'am',
+  'ar',
+  'as',
+  'ast',
+  'bg',
+  'bn',
+  'bn_IN',
+  'bs',
+  'ca',
+  'cs',
+  'cy',
+  'da',
+  'de',
+  'el',
+  'en_GB',
+  'es',
+  'et',
+  'fa',
+  'fi',
+  'fr',
+  'gl',
+  'gu',
+  'he',
+  'hi',
+  'hr',
+  'hu',
+  'id',
+  'ilo',
+  'is',
+  'it',
+  'ja',
+  'ka',
+  'kn',
+  'ko',
+  'ku',
+  'lo',
+  'lt',
+  'lv',
+  'mai',
+  'mk',
+  'ml',
+  'mr',
+  'ms',
+  'nb',
+  'nds',
+  'nl',
+  'nn',
+  'or',
+  'pa',
+  'pl',
+  'pt',
+  'pt_BR',
+  'ro',
+  'ru',
+  'si',
+  'sk',
+  'sl',
+  'sq',
+  'sr',
+  'sr@latin',
+  'sv',
+  'ta',
+  'te',
+  'tr',
+  'uk',
+  'ur',
+  'vi',
+  'zh_CN',
+  'zh_TW'
+]
+
+i18n.gettext(control_center_api_name + '-timezones', languages: linguas, preset: 'glib')
diff --git a/panels/display/Makefile.am b/panels/display/Makefile.am
index 253b4bb..b53a07e 100644
--- a/panels/display/Makefile.am
+++ b/panels/display/Makefile.am
@@ -61,7 +61,7 @@ AM_CPPFLAGS   = $(PANEL_CFLAGS) \
             -DGNOMELOCALEDIR="\"$(datadir)/locale\""
 
 CLEANFILES = $(Desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) display.gresource.xml
+EXTRA_DIST = $(resource_files) display.gresource.xml meson.build icons/meson.build
 
 if MAINTAINER_MODE
 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
diff --git a/panels/display/icons/meson.build b/panels/display/icons/meson.build
new file mode 100644
index 0000000..06289d7
--- /dev/null
+++ b/panels/display/icons/meson.build
@@ -0,0 +1,18 @@
+icon_sizes = [
+  '16x16',
+  '22x22',
+  '24x24',
+  '32x32',
+]
+
+foreach icon_size: icon_sizes
+  install_data(
+    join_paths(icon_size, 'preferences-desktop-display.png'),
+    install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+  )
+endforeach
+
+install_data(
+  'scalable/preferences-desktop-display.svg',
+  install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'apps')
+)
diff --git a/panels/display/meson.build b/panels/display/meson.build
new file mode 100644
index 0000000..4b52ac4
--- /dev/null
+++ b/panels/display/meson.build
@@ -0,0 +1,67 @@
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+# FIXME: You will need a recent intltool or the patch from this bug
+# http://bugzilla.gnome.org/show_bug.cgi?id=462312
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+sources = files(
+  'cc-' + cappletname + '-panel.c',
+  'cc-display-config.c',
+  'cc-display-config-dbus.c',
+  'cc-display-config-manager-dbus.c',
+  'cc-display-config-manager.c',
+  'cc-night-light-dialog.c',
+  'cc-night-light-widget.c',
+  'scrollarea.c',
+)
+
+resource_data = files(
+  'display.ui',
+  'icons/16x16/sunset.png',
+  'icons/16x16/sunrise.png'
+)
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: ['.', 'icons'],
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+deps = common_deps + [
+  colord_dep,
+  gnome_desktop_dep,
+  m_dep,
+  upower_glib_dep
+]
+
+cflags = [
+  '-DDATADIR="@0@"'.format(control_center_datadir),
+  '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+libdisplay = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags
+)
diff --git a/panels/info/Makefile.am b/panels/info/Makefile.am
index 5c7e9d7..c88a24c 100644
--- a/panels/info/Makefile.am
+++ b/panels/info/Makefile.am
@@ -67,6 +67,6 @@ update-from-gsd:
        git commit -m "info: Update from gnome-settings-daemon" $(SPACEFILES)
 
 CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) info.gresource.xml info-cleanup-test.txt
+EXTRA_DIST = $(resource_files) info.gresource.xml info-cleanup-test.txt meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/info/meson.build b/panels/info/meson.build
new file mode 100644
index 0000000..e41efc2
--- /dev/null
+++ b/panels/info/meson.build
@@ -0,0 +1,92 @@
+panel_names = [
+  cappletname,
+  'default-apps',
+  'info-overview',
+  'removable-media'
+]
+
+panel_list += panel_names
+
+foreach name: panel_names
+  desktop = 'gnome-' + name + '-panel.desktop'
+
+  desktop_in = configure_file(
+    input: desktop + '.in.in',
+    output: desktop + '.in',
+    configuration: desktop_conf
+  )
+
+  custom_target(
+    desktop,
+    input: desktop_in,
+    output: desktop,
+    command: intltool_desktop_cmd,
+    install: true,
+    install_dir: control_center_desktopdir
+  )
+endforeach
+
+common_cflags = [
+  '-DBINDIR="@0@"'.format(control_center_bindir),
+  '-DDATADIR="@0@"'.format(control_center_datadir),
+  '-DGNOME_SESSION_DIR="@0@"'.format(gnome_session_libexecdir),
+  '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+sources = files(
+  'cc-' + cappletname + '-panel.c',
+  'cc-info-default-apps-panel.c',
+  'cc-info-overview-panel.c',
+  'cc-info-removable-media-panel.c',
+  'gsd-disk-space-helper.c',
+  'info-cleanup.c'
+)
+
+resource_data = files(
+  'GnomeLogoVerticalMedium.svg',
+  'info-default-apps.ui',
+  'info-overview.ui',
+  'info-removable-media.ui',
+  'info.ui'
+)
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+deps = common_deps + [
+  polkit_gobject_dep,
+  dependency('libgtop-2.0')
+]
+
+libinfo = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: common_cflags
+)
+
+name = 'info-cleanup'
+
+sources = files(
+  name + '.c',
+  'test-' + name + '.c'
+)
+
+cflags = common_cflags + ['-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir())]
+
+exe = executable(
+  'test-' + name,
+  sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags
+)
+
+test(name, exe)
diff --git a/panels/keyboard/Makefile.am b/panels/keyboard/Makefile.am
index ad05b89..696307e 100644
--- a/panels/keyboard/Makefile.am
+++ b/panels/keyboard/Makefile.am
@@ -70,6 +70,7 @@ EXTRA_DIST = $(xml_in_files) \
        gnome-keybindings.loc \
        gnome-keybindings.pc.in \
        $(resource_files) \
-       keyboard.gresource.xml
+       keyboard.gresource.xml \
+       meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/keyboard/meson.build b/panels/keyboard/meson.build
new file mode 100644
index 0000000..225de49
--- /dev/null
+++ b/panels/keyboard/meson.build
@@ -0,0 +1,104 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+its_data = files(
+  'gnome-keybindings.its',
+  'gnome-keybindings.loc'
+)
+
+install_data(
+  its_data,
+  install_dir: join_paths(control_center_datadir, 'gettext', 'its')
+)
+
+pc_conf = configuration_data()
+pc_conf.set('prefix', control_center_prefix)
+pc_conf.set('datarootdir', control_center_datadir)
+pc_conf.set('datadir', control_center_datadir)
+pc_conf.set('PACKAGE', meson.project_name())
+pc_conf.set('VERSION', control_center_version)
+
+pc = 'gnome-keybindings.pc'
+
+configure_file(
+  input: pc + '.in',
+  output: pc,
+  install: true,
+  install_dir: join_paths(control_center_datadir, 'pkgconfig'),
+  configuration: pc_conf
+)
+
+xml_files = [
+  '00-multimedia.xml',
+  '01-input-sources.xml',
+  '01-launchers.xml',
+  '01-screenshot.xml',
+  '01-system.xml',
+  '50-accessibility.xml'
+]
+
+foreach file: xml_files
+  custom_target(
+    file,
+    input: file + '.in',
+    output: file,
+    command: [intltool_merge, '-x', '-u', '--no-translations', '@INPUT@', '@OUTPUT@'],
+    install: true,
+    install_dir: join_paths(control_center_pkgdatadir, 'keybindings')
+  )
+endforeach
+
+sources = files(
+  'cc-' + cappletname + '-panel.c',
+  'cc-keyboard-item.c',
+  'cc-keyboard-manager.c',
+  'cc-keyboard-option.c',
+  'cc-keyboard-shortcut-editor.c',
+  'wm-common.c',
+  'keyboard-shortcuts.c'
+)
+
+resource_data = files(
+  'enter-keyboard-shortcut.svg',
+  'gnome-keyboard-panel.ui',
+  'shortcut-editor.ui'
+)
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+deps = common_deps + [
+  gnome_desktop_dep,
+  x11_dep
+]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libkeyboard = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: [top_inc, common_inc],
+  dependencies: deps,
+  c_args: cflags
+)
diff --git a/panels/meson.build b/panels/meson.build
new file mode 100644
index 0000000..cb663d6
--- /dev/null
+++ b/panels/meson.build
@@ -0,0 +1,44 @@
+panel_list = []
+
+panels = [
+  'common',
+  'background',
+  'power',
+  'color',
+  'display',
+  'mouse',
+  'notifications',
+  'online-accounts',
+  'region',
+  'info',
+  'sound',
+  'keyboard',
+  'universal-access',
+  'user-accounts',
+  'datetime',
+  'search',
+  'privacy',
+  'sharing',
+  'printers'
+]
+
+if have_wacom
+  panels += 'wacom'
+endif
+
+if have_network_manager
+  panels += 'network'
+endif
+
+if have_bluetooth
+  panels += 'bluetooth'
+endif
+
+foreach cappletname: panels
+  cflags = [
+    '-DG_LOG_DOMAIN="@0@-cc-panel"'.format(cappletname),
+    '-DPANEL_ID="@0@"'.format(cappletname)
+  ]
+
+  subdir(cappletname)
+endforeach
diff --git a/panels/mouse/Makefile.am b/panels/mouse/Makefile.am
index aa86e0a..fe01efb 100644
--- a/panels/mouse/Makefile.am
+++ b/panels/mouse/Makefile.am
@@ -51,6 +51,6 @@ Desktop_in_files = gnome-mouse-panel.desktop.in
 desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
 
 CLEANFILES = $(Desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) mouse.gresource.xml
+EXTRA_DIST = $(resource_files) mouse.gresource.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/mouse/meson.build b/panels/mouse/meson.build
new file mode 100644
index 0000000..d2c39ee
--- /dev/null
+++ b/panels/mouse/meson.build
@@ -0,0 +1,72 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+resource_data = files(
+  'gnome-mouse-properties.ui',
+  'gnome-mouse-test.ui',
+  'scroll-test-gegl.svg',
+  'scroll-test.svg'
+)
+
+common_sources = gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+sources = common_sources + files(
+  'cc-' + cappletname + '-panel.c',
+  'cc-mouse-caps-helper.c',
+  'gnome-mouse-properties.c',
+  'gnome-mouse-test.c'
+)
+
+deps = common_deps + [
+  gnome_settings_dep,
+  x11_dep,
+  xi_dep
+]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libmouse_properties = static_library(
+  cappletname + '-properties',
+  sources: sources,
+  include_directories: [top_inc, common_inc],
+  dependencies: deps,
+  c_args: cflags,
+  link_with: libdevice
+)
+
+name = 'gnome-mouse-test'
+
+sources = common_sources + files(
+  name + '.c',
+  'test-' + name + '.c'
+)
+
+executable(
+  'test-' + name,
+  sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags
+)
diff --git a/panels/network/Makefile.am b/panels/network/Makefile.am
index fb2b891..ee368a8 100644
--- a/panels/network/Makefile.am
+++ b/panels/network/Makefile.am
@@ -60,6 +60,6 @@ desktop_in_files = gnome-network-panel.desktop.in gnome-wifi-panel.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) network.gresource.xml
+EXTRA_DIST = $(resource_files) network.gresource.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/network/connection-editor/Makefile.am b/panels/network/connection-editor/Makefile.am
index dc78662..d384b0d 100644
--- a/panels/network/connection-editor/Makefile.am
+++ b/panels/network/connection-editor/Makefile.am
@@ -51,6 +51,6 @@ net-connection-editor-resources.h: connection-editor.gresource.xml $(resource_fi
        $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name 
net_connection_editor $<
 
 EXTRA_DIST = \
-       $(resource_files) connection-editor.gresource.xml
+       $(resource_files) connection-editor.gresource.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/network/connection-editor/meson.build b/panels/network/connection-editor/meson.build
new file mode 100644
index 0000000..5acd21b
--- /dev/null
+++ b/panels/network/connection-editor/meson.build
@@ -0,0 +1,56 @@
+name = 'connection-editor'
+
+sources = files(
+  'ce-page-8021x-security.c',
+  'ce-page-details.c',
+  'ce-page-ethernet.c',
+  'ce-page-ip4.c',
+  'ce-page-ip6.c',
+  'ce-page-security.c',
+  'ce-page-vpn.c',
+  'ce-page-wifi.c',
+  'ce-page.c',
+  'net-connection-editor.c',
+  'ui-helpers.c',
+  'vpn-helpers.c'
+)
+
+resource_data = files(
+  '8021x-security-page.ui',
+  'connection-editor.ui',
+  'details-page.ui',
+  'ethernet-page.ui',
+  'ip4-page.ui',
+  'ip6-page.ui',
+  'security-page.ui',
+  'vpn-page.ui',
+  'wifi-page.ui'
+)
+
+c_name = 'net-' + name
+
+sources += gnome.compile_resources(
+  c_name + '-resources',
+  name + '.gresource.xml',
+  source_dir: '.',
+  c_name: c_name.underscorify(),
+  dependencies: resource_data,
+  export: true
+)
+
+cflags = [
+  '-DNM_VPN_CONFIG_DIR="@0@"'.format(nm_vpn_config_dir),
+  '-DNM_VPN_MODULE_DIR="@0@"'.format(nm_vpn_module_dir)
+]
+
+libconnection_editor = static_library(
+  name,
+  sources: sources,
+  include_directories: [
+    top_inc,
+    wireless_security_inc
+  ],
+  dependencies: deps,
+  c_args: cflags,
+  link_with: libwireless_security
+)
diff --git a/panels/network/meson.build b/panels/network/meson.build
new file mode 100644
index 0000000..015f7aa
--- /dev/null
+++ b/panels/network/meson.build
@@ -0,0 +1,79 @@
+deps = common_deps + network_manager_deps + [
+  polkit_gobject_dep,
+  dependency('gmodule-2.0')
+]
+
+subdir('wireless-security')
+subdir('connection-editor')
+
+panel_names = [
+  cappletname,
+  'wifi'
+]
+
+panel_list += panel_names
+
+foreach name: panel_names
+  desktop = 'gnome-' + name + '-panel.desktop'
+
+  desktop_in = configure_file(
+    input: desktop + '.in.in',
+    output: desktop + '.in',
+    configuration: desktop_conf
+  )
+
+  custom_target(
+    desktop,
+    input: desktop_in,
+    output: desktop,
+    command: intltool_desktop_cmd,
+    install: true,
+    install_dir: control_center_desktopdir
+  )
+endforeach
+
+sources = files(
+  'cc-' + cappletname + '-panel.c',
+  'cc-wifi-panel.c',
+  'net-device.c',
+  'net-device-ethernet.c',
+  'net-device-mobile.c',
+  'net-device-simple.c',
+  'net-device-wifi.c',
+  'net-object.c',
+  'net-proxy.c',
+  'net-vpn.c',
+  'network-dialogs.c',
+  'panel-common.c'
+)
+
+resource_data = files(
+  'network-ethernet.ui',
+  'network-mobile.ui',
+  'network-proxy.ui',
+  'network-simple.ui',
+  'network.ui',
+  'network-vpn.ui',
+  'network-wifi.ui',
+  'wifi.ui'
+)
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libnetwork = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags,
+  link_with: libconnection_editor
+)
diff --git a/panels/network/wireless-security/Makefile.am b/panels/network/wireless-security/Makefile.am
index 2e8d490..d6d9252 100644
--- a/panels/network/wireless-security/Makefile.am
+++ b/panels/network/wireless-security/Makefile.am
@@ -67,6 +67,6 @@ update-from-nma:
              git add $(resource_files) && \
              git commit -m "network: Update wireless-security UI from network-manager-applet"
 
-EXTRA_DIST = $(resource_files) wireless-security.gresource.xml nm-connection-editor-to-network-panel.patch 
nm-connection-editor-ui-to-network-panel.patch
+EXTRA_DIST = $(resource_files) wireless-security.gresource.xml nm-connection-editor-to-network-panel.patch 
nm-connection-editor-ui-to-network-panel.patch meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/network/wireless-security/meson.build b/panels/network/wireless-security/meson.build
new file mode 100644
index 0000000..1554c2f
--- /dev/null
+++ b/panels/network/wireless-security/meson.build
@@ -0,0 +1,55 @@
+name = 'wireless-security'
+
+wireless_security_inc = include_directories('.')
+
+sources = files(
+  'eap-method-fast.c',
+  'eap-method-leap.c',
+  'eap-method-peap.c',
+  'eap-method-simple.c',
+  'eap-method-tls.c',
+  'eap-method-ttls.c',
+  'eap-method.c',
+  'helpers.c',
+  'utils.c',
+  'wireless-security.c',
+  'ws-leap.c',
+  'ws-dynamic-wep.c',
+  'ws-wep-key.c',
+  'ws-wpa-eap.c',
+  'ws-wpa-psk.c'
+)
+
+resource_data = files(
+  'eap-method-fast.ui',
+  'eap-method-leap.ui',
+  'eap-method-peap.ui',
+  'eap-method-simple.ui',
+  'eap-method-tls.ui',
+  'eap-method-ttls.ui',
+  'ws-dynamic-wep.ui',
+  'ws-leap.ui',
+  'ws-wep-key.ui',
+  'ws-wpa-eap.ui',
+  'ws-wpa-psk.ui'
+)
+
+sources += gnome.compile_resources(
+  name + '-resources',
+  name + '.gresource.xml',
+  source_dir: '.',
+  c_name: name.underscorify(),
+  dependencies: resource_data,
+  export: true
+)
+
+# FIXME: is this uidir from ./panels/sharing/Makefile.am?
+cflags = '-DUIDIR="@0@"'.format(control_center_pkgdatadir, 'ui', 'sharing')
+
+libwireless_security = static_library(
+  name,
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags
+)
diff --git a/panels/notifications/Makefile.am b/panels/notifications/Makefile.am
index 03fc755..9eda62e 100644
--- a/panels/notifications/Makefile.am
+++ b/panels/notifications/Makefile.am
@@ -34,6 +34,6 @@ desktop_in_files = gnome-notifications-panel.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) notifications.gresource.xml
+EXTRA_DIST = $(resource_files) notifications.gresource.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/notifications/meson.build b/panels/notifications/meson.build
new file mode 100644
index 0000000..7db452c
--- /dev/null
+++ b/panels/notifications/meson.build
@@ -0,0 +1,46 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+sources = files(
+  'cc-' + cappletname + '-panel.c',
+  'cc-edit-dialog.c'
+)
+
+resource_data = files(
+  'edit-dialog.ui',
+  'notifications.ui'
+)
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libnotifications = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: common_deps,
+  c_args: cflags
+)
diff --git a/panels/online-accounts/Makefile.am b/panels/online-accounts/Makefile.am
index ed553f5..6ad371c 100644
--- a/panels/online-accounts/Makefile.am
+++ b/panels/online-accounts/Makefile.am
@@ -41,6 +41,6 @@ desktop_in_files = gnome-online-accounts-panel.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) online-accounts.gresource.xml
+EXTRA_DIST = $(resource_files) online-accounts.gresource.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/online-accounts/icons/Makefile.am b/panels/online-accounts/icons/Makefile.am
index 10789e2..e089966 100644
--- a/panels/online-accounts/icons/Makefile.am
+++ b/panels/online-accounts/icons/Makefile.am
@@ -1,6 +1,8 @@
 
 SUBDIRS = 16x16 22x22 24x24 32x32 48x48 256x256
 
+EXTRA_DIST = meson.build
+
 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
 
 if MAINTAINER_MODE
diff --git a/panels/online-accounts/icons/meson.build b/panels/online-accounts/icons/meson.build
new file mode 100644
index 0000000..93a340a
--- /dev/null
+++ b/panels/online-accounts/icons/meson.build
@@ -0,0 +1,15 @@
+icon_sizes = [
+  '16x16',
+  '22x22',
+  '24x24',
+  '32x32',
+  '48x48',
+  '256x256'
+]
+
+foreach icon_size: icon_sizes
+  install_data(
+    join_paths(icon_size, 'goa-panel.png'),
+    install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+  )
+endforeach
diff --git a/panels/online-accounts/meson.build b/panels/online-accounts/meson.build
new file mode 100644
index 0000000..3e3a531
--- /dev/null
+++ b/panels/online-accounts/meson.build
@@ -0,0 +1,48 @@
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+sources = files('cc-' + cappletname + '-panel.c')
+
+resource_data = files('online-accounts.ui')
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname.underscorify(),
+  dependencies: resource_data,
+  export: true
+)
+
+deps = common_deps + [
+  goa_dep,
+  libgd_dep,
+  dependency('goa-backend-1.0', version: goa_req_version)
+]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libonline_accounts = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags
+)
diff --git a/panels/power/Makefile.am b/panels/power/Makefile.am
index 1edad41..fc8131d 100644
--- a/panels/power/Makefile.am
+++ b/panels/power/Makefile.am
@@ -45,6 +45,6 @@ desktop_in_files = gnome-power-panel.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) power.gresource.xml
+EXTRA_DIST = $(resource_files) power.gresource.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/power/icons/Makefile.am b/panels/power/icons/Makefile.am
index 78ee00b..2c42044 100644
--- a/panels/power/icons/Makefile.am
+++ b/panels/power/icons/Makefile.am
@@ -1,6 +1,8 @@
 
 SUBDIRS = 16x16 22x22 24x24 32x32 48x48 256x256
 
+EXTRA_DIST = meson.build
+
 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
 
 if MAINTAINER_MODE
diff --git a/panels/power/icons/meson.build b/panels/power/icons/meson.build
new file mode 100644
index 0000000..4e36288
--- /dev/null
+++ b/panels/power/icons/meson.build
@@ -0,0 +1,15 @@
+icon_sizes = [
+  '16x16',
+  '22x22',
+  '24x24',
+  '32x32',
+  '48x48',
+  '256x256'
+]
+
+foreach icon_size: icon_sizes
+  install_data(
+    join_paths(icon_size, 'gnome-power-manager.png'),
+    install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+  )
+endforeach
diff --git a/panels/power/meson.build b/panels/power/meson.build
new file mode 100644
index 0000000..b540738
--- /dev/null
+++ b/panels/power/meson.build
@@ -0,0 +1,55 @@
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+sources = files('cc-' + cappletname + '-panel.c')
+
+resource_data = files('power.ui')
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+deps = common_deps + [
+  gnome_settings_dep,
+  upower_glib_dep
+]
+
+if have_bluetooth
+  deps += gnome_bluetooth_dep
+endif
+
+if have_network_manager
+  deps += network_manager_deps
+endif
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libpower = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags
+)
diff --git a/panels/printers/Makefile.am b/panels/printers/Makefile.am
index 65ecdc3..a465770 100644
--- a/panels/printers/Makefile.am
+++ b/panels/printers/Makefile.am
@@ -73,7 +73,7 @@ desktop_in_files = gnome-printers-panel.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) printers.gresource.xml
+EXTRA_DIST = $(resource_files) printers.gresource.xml meson.build
 
 noinst_PROGRAMS = $(TEST_PROGS)
 TEST_PROGS += test-shift test-canonicalization
diff --git a/panels/printers/meson.build b/panels/printers/meson.build
new file mode 100644
index 0000000..c2fa17e
--- /dev/null
+++ b/panels/printers/meson.build
@@ -0,0 +1,99 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+sources = files(
+  'cc-' + cappletname + '-panel.c',
+  'pp-cups.c',
+  'pp-details-dialog.c',
+  'pp-host.c',
+  'pp-ipp-option-widget.c',
+  'pp-job.c',
+  'pp-jobs-dialog.c',
+  'pp-maintenance-command.c',
+  'pp-new-printer-dialog.c',
+  'pp-new-printer.c',
+  'pp-options-dialog.c',
+  'pp-ppd-option-widget.c',
+  'pp-ppd-selection-dialog.c',
+  'pp-print-device.c',
+  'pp-printer-entry.c',
+  'pp-printer.c',
+  'pp-samba.c',
+  'pp-utils.c'
+)
+
+resource_data = files(
+  'authentication-dialog.ui',
+  'details-dialog.ui',
+  'jobs-dialog.ui',
+  'new-printer-dialog.ui',
+  'options-dialog.ui',
+  'ppd-selection-dialog.ui',
+  'printer-entry.ui',
+  'printers.ui'
+)
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+deps = common_deps + [
+  cups_dep,
+  m_dep,
+  polkit_gobject_dep,
+  dependency('smbclient')
+]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libprinters = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: [top_inc, common_inc, shell_inc],
+  dependencies: deps,
+  c_args: cflags
+)
+
+test_units = [
+  'test-canonicalization',
+  'test-shift'
+]
+
+sources = files(
+  'pp-print-device.c',
+  'pp-utils.c'
+)
+
+cflags = '-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir())
+
+foreach unit: test_units
+  exe = executable(
+    unit,
+    [unit + '.c'] + sources,
+    include_directories: top_inc,
+    dependencies: deps,
+    c_args: cflags
+  )
+
+  test(unit, exe)
+endforeach
diff --git a/panels/privacy/Makefile.am b/panels/privacy/Makefile.am
index ec9e5cc..73d5084 100644
--- a/panels/privacy/Makefile.am
+++ b/panels/privacy/Makefile.am
@@ -33,6 +33,6 @@ desktop_in_files = gnome-privacy-panel.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) privacy.gresource.xml
+EXTRA_DIST = $(resource_files) privacy.gresource.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/privacy/meson.build b/panels/privacy/meson.build
new file mode 100644
index 0000000..3b4ecff
--- /dev/null
+++ b/panels/privacy/meson.build
@@ -0,0 +1,40 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+sources = files('cc-' + cappletname + '-panel.c')
+
+resource_data = files('privacy.ui')
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libprivacy = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: [top_inc, common_inc],
+  dependencies: common_deps,
+  c_args: cflags
+)
diff --git a/panels/region/Makefile.am b/panels/region/Makefile.am
index bdef769..c289ce3 100644
--- a/panels/region/Makefile.am
+++ b/panels/region/Makefile.am
@@ -47,6 +47,6 @@ Desktop_in_files = gnome-region-panel.desktop.in
 desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
 
 CLEANFILES = $(Desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) region.gresource.xml
+EXTRA_DIST = $(resource_files) region.gresource.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/region/meson.build b/panels/region/meson.build
new file mode 100644
index 0000000..e0e1958
--- /dev/null
+++ b/panels/region/meson.build
@@ -0,0 +1,60 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+sources = files(
+  'cc-' + cappletname + '-panel.c',
+  'cc-format-chooser.c',
+  'cc-ibus-utils.c',
+  'cc-input-chooser.c',
+  'cc-input-options.c'
+)
+
+resource_data = files(
+  'format-chooser.ui',
+  'input-chooser.ui',
+  'input-options.ui',
+  'region.ui'
+)
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+deps = common_deps + [
+  accounts_dep,
+  gnome_desktop_dep,
+  libgd_dep,
+  polkit_gobject_dep
+]
+
+if enable_ibus
+  deps += dependency('ibus-1.0', version: '>= 1.5.2')
+endif
+
+libregion = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: [top_inc, common_inc],
+  dependencies: deps,
+  link_with: liblanguage
+)
diff --git a/panels/search/Makefile.am b/panels/search/Makefile.am
index 2041bc0..323cb03 100644
--- a/panels/search/Makefile.am
+++ b/panels/search/Makefile.am
@@ -36,6 +36,6 @@ desktop_in_files = gnome-search-panel.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) search.gresource.xml
+EXTRA_DIST = $(resource_files) search.gresource.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/search/meson.build b/panels/search/meson.build
new file mode 100644
index 0000000..9c7b32d
--- /dev/null
+++ b/panels/search/meson.build
@@ -0,0 +1,49 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+sources = files(
+  'cc-' + cappletname + '-panel.c',
+  'cc-search-locations-dialog.c'
+)
+
+resource_data = files(
+  'search-locations-dialog.ui',
+  'search.ui'
+)
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+cflags = [
+  '-DDATADIR="@0@"'.format(control_center_datadir),
+  '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+libsearch = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: common_deps,
+  c_args: cflags
+)
diff --git a/panels/sharing/Makefile.am b/panels/sharing/Makefile.am
index ec5cd3f..24b805d 100644
--- a/panels/sharing/Makefile.am
+++ b/panels/sharing/Makefile.am
@@ -76,6 +76,6 @@ desktop_in_files = gnome-sharing-panel.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(polkit_policy_DATA) $(polkit_policy_in_files) 
$(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) sharing.gresource.xml 
org.gnome.controlcenter.remote-login-helper.policy.in.in org.gnome.SettingsDaemon.Sharing.xml
+EXTRA_DIST = $(resource_files) sharing.gresource.xml 
org.gnome.controlcenter.remote-login-helper.policy.in.in org.gnome.SettingsDaemon.Sharing.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/sharing/meson.build b/panels/sharing/meson.build
new file mode 100644
index 0000000..0864681
--- /dev/null
+++ b/panels/sharing/meson.build
@@ -0,0 +1,100 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+polkit_conf = configuration_data()
+polkit_conf.set('libexecdir', control_center_libexecdir)
+
+polkit = 'org.gnome.controlcenter.remote-login-helper.policy'
+
+polkit_in = configure_file(
+  input: polkit + '.in.in',
+  output: polkit + '.in',
+  configuration: polkit_conf
+)
+
+custom_target(
+  polkit,
+  input: polkit_in,
+  output: polkit,
+  command: intltool_xml_cmd,
+  install: true,
+  install_dir: join_paths(control_center_datadir, 'polkit-1', 'actions')
+)
+
+sources = files(
+  'cc-' + cappletname + '-panel.c',
+  'cc-media-sharing.c',
+  'cc-remote-login.c',
+  'cc-sharing-networks.c',
+  'cc-sharing-switch.c',
+  'file-share-properties.c',
+  'vino-preferences.c'
+)
+
+resource_data = files(
+  'networks.ui',
+  'sharing.ui'
+)
+
+sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+settings_daemon = 'org.gnome.SettingsDaemon'
+gdbus = settings_daemon + '.Sharing'
+
+sources += gnome.gdbus_codegen(
+  gdbus,
+  gdbus + '.xml',
+  interface_prefix: settings_daemon + '.',
+  namespace: 'Gsd'
+)
+
+cflags = [
+  '-DLIBEXECDIR="@0@"'.format(control_center_libexecdir),
+  '-DSYSCONFDIR="@0@"'.format(control_center_sysconfdir)
+]
+
+libsharing = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: common_deps,
+  c_args: cflags
+)
+
+name = 'cc-remote-login-helper'
+
+deps = [
+  gio_dep,
+  glib_dep
+]
+
+executable(
+  name,
+  name + '.c',
+  include_directories: top_inc,
+  dependencies: deps,
+  install: true,
+  install_dir: control_center_libexecdir
+)
diff --git a/panels/sound/Makefile.am b/panels/sound/Makefile.am
index fb66d37..a9a42fd 100644
--- a/panels/sound/Makefile.am
+++ b/panels/sound/Makefile.am
@@ -64,6 +64,9 @@ CLEANFILES =                          \
        $(BUILT_SOURCES)                \
        $(NULL)
 
+EXTRA_DIST =                           \
+       meson.build
+
 MAINTAINERCLEANFILES =                  \
         *~                              \
         Makefile.in
diff --git a/panels/sound/data/icons/Makefile.am b/panels/sound/data/icons/Makefile.am
index 35e2de2..c2884ea 100644
--- a/panels/sound/data/icons/Makefile.am
+++ b/panels/sound/data/icons/Makefile.am
@@ -9,4 +9,6 @@ SUBDIRS = \
        48x48           \
        $(NULL)
 
+EXTRA_DIST = meson.build
+
 -include $(top_srcdir)/git.mk
diff --git a/panels/sound/data/icons/meson.build b/panels/sound/data/icons/meson.build
new file mode 100644
index 0000000..4ddfefc
--- /dev/null
+++ b/panels/sound/data/icons/meson.build
@@ -0,0 +1,69 @@
+apps_files = [
+  'multimedia-volume-control.png',
+  'multimedia-volume-control.svg'
+]
+
+device_files = [
+  'audio-headset.svg'
+]
+
+status_files = [
+  'audio-input-microphone-high.png',
+  'audio-input-microphone-low.png',
+  'audio-input-microphone-medium.png',
+  'audio-input-microphone-muted.png'
+]
+
+scalable_device_files = [
+  'audio-speaker-center-back.svg',
+  'audio-speaker-center-back-testing.svg',
+  'audio-speaker-center.svg',
+  'audio-speaker-center-testing.svg',
+  'audio-speaker-left-back.svg',
+  'audio-speaker-left-back-testing.svg',
+  'audio-speaker-left-side.svg',
+  'audio-speaker-left-side-testing.svg',
+  'audio-speaker-left.svg',
+  'audio-speaker-left-testing.svg',
+  'audio-speaker-right-back.svg',
+  'audio-speaker-right-back-testing.svg',
+  'audio-speaker-right-side.svg',
+  'audio-speaker-right-side-testing.svg',
+  'audio-speaker-right.svg',
+  'audio-speaker-right-testing.svg',
+  'audio-speaker-testing.svg',
+  'audio-subwoofer.svg',
+  'audio-subwoofer-testing.svg'
+]
+
+icon_sizes = [
+  ['16x16', [apps_files, device_files, status_files]],
+  ['22x22', [apps_files, [], status_files]],
+  ['24x24', [['multimedia-volume-control.png'], device_files, status_files]],
+  ['32x32', [apps_files, device_files, status_files]],
+  ['48x48', [['multimedia-volume-control.png'], device_files, []]],
+  ['scalable', [['multimedia-volume-control.svg'], scalable_device_files, []]]
+]
+
+foreach icon_size: icon_sizes
+  foreach file: icon_size[1][0]
+    install_data(
+      join_paths(icon_size[0], 'apps', file),
+      install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size[0], 'apps')
+    )
+  endforeach
+
+  foreach file: icon_size[1][1]
+    install_data(
+      join_paths(icon_size[0], 'devices', file),
+      install_dir: join_paths(control_center_pkgdatadir, 'icons', 'hicolor', icon_size[0], 'devices')
+    )
+  endforeach
+
+  foreach file: icon_size[1][2]
+    install_data(
+      join_paths(icon_size[0], 'status', file),
+      install_dir: join_paths(control_center_pkgdatadir, 'icons', 'hicolor', icon_size[0], 'status')
+    )
+  endforeach
+endforeach
diff --git a/panels/sound/data/sounds/Makefile.am b/panels/sound/data/sounds/Makefile.am
index 3277593..ed0cac5 100644
--- a/panels/sound/data/sounds/Makefile.am
+++ b/panels/sound/data/sounds/Makefile.am
@@ -17,7 +17,7 @@ metadata_DATA = $(metadata_in_files:.xml.in=.xml)
 noinst_DATA = gnome-sounds-default.xml.in
 CLEANFILES = gnome-sounds-default.xml gnome-sounds-default.xml.in
 
-EXTRA_DIST = $(sound_DATA) gnome-sounds-default.xml.in.in
+EXTRA_DIST = $(sound_DATA) gnome-sounds-default.xml.in.in meson.build
 
 gnome-sounds-default.xml.in: gnome-sounds-default.xml.in.in Makefile
        $(AM_V_GEN)sed -e 's^\@datadir\@^$(datadir)^g' < $(srcdir)/gnome-sounds-default.xml.in.in > 
gnome-sounds-default.xml.in.tmp \
diff --git a/panels/sound/data/sounds/meson.build b/panels/sound/data/sounds/meson.build
new file mode 100644
index 0000000..2d9321a
--- /dev/null
+++ b/panels/sound/data/sounds/meson.build
@@ -0,0 +1,31 @@
+sound_data = files(
+  'bark.ogg',
+  'drip.ogg',
+  'glass.ogg',
+  'sonar.ogg'
+)
+
+install_data(
+  sound_data,
+  install_dir: join_paths(control_center_datadir, 'sounds', 'gnome', 'default', 'alerts')
+)
+
+metadata_conf = configuration_data()
+metadata_conf.set('datadir', control_center_datadir)
+
+metadata = 'gnome-sounds-default.xml'
+
+metadata_in = configure_file(
+  input: metadata + '.in.in',
+  output: metadata + '.in',
+  configuration: metadata_conf
+)
+
+custom_target(
+  metadata,
+  input: metadata_in,
+  output: metadata,
+  command: intltool_xml_cmd,
+  install: true,
+  install_dir: join_paths(control_center_pkgdatadir, 'sounds')
+)
diff --git a/panels/sound/data/symbolic-icons/Makefile.am b/panels/sound/data/symbolic-icons/Makefile.am
index 9f95f49..b6ca043 100644
--- a/panels/sound/data/symbolic-icons/Makefile.am
+++ b/panels/sound/data/symbolic-icons/Makefile.am
@@ -5,6 +5,7 @@ SUBDIRS = scalable
 EXTRA_DIST =                                   \
        src                                     \
        r.rb                                    \
+       meson.build                             \
        $(NULL)
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/sound/data/symbolic-icons/meson.build b/panels/sound/data/symbolic-icons/meson.build
new file mode 100644
index 0000000..131fb09
--- /dev/null
+++ b/panels/sound/data/symbolic-icons/meson.build
@@ -0,0 +1,13 @@
+status_files = [
+  'audio-input-microphone-high-symbolic.svg',
+  'audio-input-microphone-low-symbolic.svg',
+  'audio-input-microphone-medium-symbolic.svg',
+  'audio-input-microphone-muted-symbolic.svg'
+]
+
+foreach file: status_files
+  install_data(
+    join_paths('scalable', 'status', file),
+    install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'status')
+  )
+endforeach
diff --git a/panels/sound/meson.build b/panels/sound/meson.build
new file mode 100644
index 0000000..f70ba99
--- /dev/null
+++ b/panels/sound/meson.build
@@ -0,0 +1,67 @@
+subdir('data/icons')
+subdir('data/sounds')
+subdir('data/symbolic-icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: 'data/' + desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+deps = common_deps + [
+  libgvc_dep,
+  libxml_dep,
+  m_dep,
+  pulse_dep,
+  pulse_mainloop_dep,
+  dependency('libcanberra-gtk3', version: '>= 0.13')
+]
+
+cflags = [
+  '-DGLADEDIR="@0@"'.format(control_center_pkgdatadir),
+  '-DICON_DATA_DIR="@0@"'.format(join_paths(control_center_pkgdatadir, 'icons')),
+  '-DLIBEXECDIR="@0@"'.format(control_center_libexecdir),
+  '-DLOCALE_DIR="@0@"'.format(control_center_localedir),
+  '-DSOUND_DATA_DIR="@0@"'.format(join_paths(control_center_datadir, 'sounds')),
+  '-DSOUND_SET_DIR="@0@"'.format(join_paths(control_center_pkgdatadir, 'sounds'))
+]
+
+libgvcgtk = static_library(
+  'gvcgtk',
+  sources: 'gvc-channel-bar.c',
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags
+)
+
+sources = files(
+  'cc-' + cappletname + '-panel.c',
+  'gvc-balance-bar.c',
+  'gvc-combo-box.c',
+  'gvc-level-bar.c',
+  'gvc-mixer-dialog.c',
+  'gvc-sound-theme-chooser.c',
+  'gvc-speaker-test.c',
+  'sound-theme-file-utils.c'
+)
+
+libsound = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags,
+  link_with: libgvcgtk
+)
diff --git a/panels/universal-access/Makefile.am b/panels/universal-access/Makefile.am
index b0efc5e..779bb96 100644
--- a/panels/universal-access/Makefile.am
+++ b/panels/universal-access/Makefile.am
@@ -35,6 +35,6 @@ desktop_in_files = gnome-universal-access-panel.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 CLEANFILES = $(desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) universal-access.gresource.xml
+EXTRA_DIST = $(resource_files) universal-access.gresource.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/universal-access/meson.build b/panels/universal-access/meson.build
new file mode 100644
index 0000000..7956ac9
--- /dev/null
+++ b/panels/universal-access/meson.build
@@ -0,0 +1,53 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+sources = files(
+  'cc-ua-panel.c',
+  'zoom-options.c'
+)
+
+resource_data = files(
+  'left_ptr_24px.png',
+  'left_ptr_32px.png',
+  'left_ptr_48px.png',
+  'left_ptr_64px.png',
+  'left_ptr_96px.png',
+  'uap.ui',
+  'zoom-options.ui'
+)
+
+sources += gnome.compile_resources(
+  'cc-ua-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname.underscorify(),
+  dependencies: resource_data,
+  export: true
+)
+
+deps = common_deps + [m_dep]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libuniversal_access = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags
+)
diff --git a/panels/user-accounts/Makefile.am b/panels/user-accounts/Makefile.am
index bfa7821..b85a018 100644
--- a/panels/user-accounts/Makefile.am
+++ b/panels/user-accounts/Makefile.am
@@ -116,6 +116,7 @@ EXTRA_DIST =                                \
        $(polkit_in_files)              \
        $(resource_files)               \
        user-accounts.gresource.xml     \
+       meson.build                     \
        $(NULL)
 
 CLEANFILES =                           \
diff --git a/panels/user-accounts/meson.build b/panels/user-accounts/meson.build
new file mode 100644
index 0000000..103b890
--- /dev/null
+++ b/panels/user-accounts/meson.build
@@ -0,0 +1,171 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: 'data/' + desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+image_data = files(
+  'data/faces/astronaut.jpg',
+  'data/faces/baseball.png',
+  'data/faces/butterfly.png',
+  'data/faces/cat-eye.jpg',
+  'data/faces/chess.jpg',
+  'data/faces/coffee.jpg',
+  'data/faces/dice.jpg',
+  'data/faces/energy-arc.jpg',
+  'data/faces/fish.jpg',
+  'data/faces/flake.jpg',
+  'data/faces/flower.jpg',
+  'data/faces/grapes.jpg',
+  'data/faces/guitar.jpg',
+  'data/faces/launch.jpg',
+  'data/faces/leaf.jpg',
+  'data/faces/lightning.jpg',
+  'data/faces/penguin.jpg',
+  'data/faces/puppy.jpg',
+  'data/faces/sky.jpg',
+  'data/faces/soccerball.png',
+  'data/faces/sunflower.jpg',
+  'data/faces/sunset.jpg',
+  'data/faces/tennis-ball.png',
+  'data/faces/yellow-rose.jpg'
+)
+
+install_data(
+  image_data,
+  install_dir: join_paths(control_center_datadir, 'pixmaps', 'faces')
+)
+
+polkit = 'org.gnome.controlcenter.' + cappletname + '.policy'
+
+custom_target(
+  polkit,
+  input: polkit + '.in',
+  output: polkit,
+  command: intltool_xml_cmd,
+  install: true,
+  install_dir: join_paths(control_center_datadir, 'polkit-1', 'actions')
+)
+
+common_sources = files(
+  'pw-utils.c',
+  'um-account-dialog.c',
+  'um-realm-manager.c',
+  'um-utils.c'
+)
+
+resource_data = files(
+  'data/icons/left-index-finger.png',
+  'data/icons/left-little-finger.png',
+  'data/icons/left-middle-finger.png',
+  'data/icons/left-ring-finger.png',
+  'data/icons/left-thumb.png',
+  'data/icons/print_error.png',
+  'data/icons/print_ok.png',
+  'data/icons/right-index-finger.png',
+  'data/icons/right-little-finger.png',
+  'data/icons/right-middle-finger.png',
+  'data/icons/right-ring-finger.png',
+  'data/icons/right-thumb.png',
+  'data/account-dialog.ui',
+  'data/account-fingerprint.ui',
+  'data/carousel.css',
+  'data/carousel.ui',
+  'data/history-dialog.ui',
+  'data/join-dialog.ui',
+  'data/password-dialog.ui',
+  'data/user-accounts-dialog.css',
+  'data/user-accounts-dialog.ui'
+)
+
+common_sources += gnome.compile_resources(
+  'um-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'um',
+  dependencies: resource_data,
+  export: true
+)
+
+realmd_namespace = 'org.freedesktop.realmd'
+
+common_sources += gnome.gdbus_codegen(
+  'um-realm-generated',
+  'data/' + realmd_namespace + '.xml',
+  interface_prefix: realmd_namespace + '.',
+  namespace: 'UmRealm',
+  object_manager: true,
+  annotations: ['org.freedesktop.realmd.Realm', 'org.gtk.GDBus.C.Name', 'Common']
+)
+
+sources = common_sources + files(
+  'cc-crop-area.c',
+  'run-passwd.c',
+  'um-account-type.c',
+  'um-carousel.c',
+  'um-cell-renderer-user-image.c',
+  'um-fingerprint-dialog.c',
+  'um-history-dialog.c',
+  'um-password-dialog.c',
+  'um-photo-dialog.c',
+  'um-user-image.c',
+  'um-user-panel.c'
+)
+
+# Kerberos kerberos support
+krb_dep = dependency('krb5', required: false)
+assert(krb_dep.found(), 'kerberos libraries not found in your path')
+
+deps = common_deps + [
+  accounts_dep,
+  gdk_pixbuf_dep,
+  gnome_desktop_dep,
+  libgd_dep,
+  krb_dep,
+  m_dep,
+  polkit_gobject_dep,
+  dependency('pwquality', version: '>= 1.2.2')
+]
+
+if have_cheese
+  deps += cheese_deps
+endif
+
+cflags = [
+  '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir),
+  '-DHAVE_LIBPWQUALITY',
+  '-DUM_PIXMAP_DIR="@0@"'.format(join_paths(control_center_pkgdatadir, 'pixmaps'))
+]
+
+libuser_accounts = static_library(
+  cappletname,
+  sources: sources,
+  include_directories: [top_inc, common_inc, shell_inc],
+  dependencies: deps,
+  c_args: cflags,
+  link_with: liblanguage
+)
+
+name = 'frob-account-dialog'
+
+sources = common_sources + files(name + '.c')
+
+executable(
+  name,
+  sources,
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: cflags
+)
diff --git a/panels/wacom/Makefile.am b/panels/wacom/Makefile.am
index 78e9211..e678abc 100644
--- a/panels/wacom/Makefile.am
+++ b/panels/wacom/Makefile.am
@@ -86,6 +86,6 @@ desktop_in_files = gnome-wacom-panel.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 CLEANFILES = $(Desktop_in_files) $(desktop_DATA) $(BUILT_SOURCES)
-EXTRA_DIST = $(resource_files) wacom.gresource.xml
+EXTRA_DIST = $(resource_files) wacom.gresource.xml meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/panels/wacom/calibrator/Makefile.am b/panels/wacom/calibrator/Makefile.am
index 38e9e82..c0df5f5 100644
--- a/panels/wacom/calibrator/Makefile.am
+++ b/panels/wacom/calibrator/Makefile.am
@@ -44,4 +44,6 @@ test_calibrator_SOURCES =             \
 test_calibrator_CPPFLAGS = $(AM_CPPFLAGS)
 test_calibrator_LDADD = $(PANEL_LIBS) $(WACOM_PANEL_LIBS) $(LIBM)
 
+EXTRA_DIST = meson.build
+
 -include $(top_srcdir)/git.mk
diff --git a/panels/wacom/calibrator/meson.build b/panels/wacom/calibrator/meson.build
new file mode 100644
index 0000000..2877904
--- /dev/null
+++ b/panels/wacom/calibrator/meson.build
@@ -0,0 +1,36 @@
+calibrator_inc = include_directories('.')
+
+common_sources = files(
+  'calibrator.c',
+  'calibrator-gui.c',
+  'cc-clock-actor.c',
+  'cc-target-actor.c'
+)
+
+calibrator_deps = deps + [m_dep]
+
+libwacom_calibrator = static_library(
+  cappletname + '-calibrator',
+  sources: common_sources,
+  include_directories: top_inc,
+  dependencies: calibrator_deps,
+  c_args: cflags
+)
+
+libwacom_calibrator_test = static_library(
+  cappletname + '-calibrator-test',
+  sources: common_sources,
+  include_directories: top_inc,
+  dependencies: calibrator_deps,
+  c_args: test_cflags
+)
+
+sources = common_sources + files('main.c')
+
+executable(
+  'test-calibrator',
+  sources,
+  include_directories: top_inc,
+  dependencies: calibrator_deps,
+  c_args: cflags
+)
diff --git a/panels/wacom/meson.build b/panels/wacom/meson.build
new file mode 100644
index 0000000..677e96a
--- /dev/null
+++ b/panels/wacom/meson.build
@@ -0,0 +1,108 @@
+deps = common_deps + [
+  clutter_dep,
+  clutter_gtk_dep,
+  gnome_desktop_dep,
+  gnome_settings_dep,
+  libwacom_dep,
+  x11_dep,
+  xi_dep
+]
+
+cflags = ['-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)]
+
+test_cflags = cflags + ['-DFAKE_AREA']
+
+subdir('calibrator')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+common_sources = files(
+  'cc-tablet-tool-map.c',
+  'cc-wacom-button-row.c',
+  'cc-wacom-device.c',
+  'cc-wacom-mapping-panel.c',
+  'cc-wacom-nav-button.c',
+  'cc-wacom-page.c',
+  'cc-wacom-stylus-page.c',
+  'cc-wacom-tool.c',
+  'gsd-wacom-key-shortcut-button.c'
+)
+
+resource_data = files(
+  'button-mapping.ui',
+  'gnome-wacom-properties.ui',
+  'wacom-stylus-airbrush.svg',
+  'wacom-stylus-art-pen.svg',
+  'wacom-stylus-classic.svg',
+  'wacom-stylus-inking.svg',
+  'wacom-stylus-no-eraser.svg',
+  'wacom-stylus-page.ui',
+  'wacom-stylus.svg',
+  'wacom-tablet-cintiq.svg',
+  'wacom-tablet-pc.svg',
+  'wacom-tablet.svg'
+)
+
+common_sources += gnome.compile_resources(
+  'cc-' + cappletname + '-resources',
+  cappletname + '.gresource.xml',
+  source_dir: '.',
+  c_name: 'cc_' + cappletname,
+  dependencies: resource_data,
+  export: true
+)
+
+sources = common_sources + files(
+  'cc-' + cappletname + '-panel.c',
+  'cc-drawing-area.c'
+)
+
+incs = [
+  top_inc,
+  common_inc,
+  calibrator_inc
+]
+
+libwacom_properties = static_library(
+  cappletname + '-properties',
+  sources: sources,
+  include_directories: incs,
+  dependencies: deps,
+  c_args: cflags,
+  link_with: [
+    libdevice,
+    libwacom_calibrator
+  ]
+)
+
+name = 'test-wacom'
+
+sources = common_sources + files(name + '.c')
+
+executable(
+  name,
+  sources,
+  include_directories: incs,
+  dependencies: deps,
+  c_args: test_cflags,
+  link_with: [
+    libdevice,
+    libwacom_calibrator_test
+  ]
+)
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..ac7bc95
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext(control_center_api_name, preset: 'glib')
diff --git a/search-provider/Makefile.am b/search-provider/Makefile.am
index 9330ff9..a07599c 100644
--- a/search-provider/Makefile.am
+++ b/search-provider/Makefile.am
@@ -46,7 +46,7 @@ service_in_files =                            \
 org.gnome.ControlCenter.SearchProvider.service: org.gnome.ControlCenter.SearchProvider.service.in Makefile
        $(AM_V_GEN) sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
 
-EXTRA_DIST = $(service_in_files) org.gnome.ShellSearchProvider2.xml
+EXTRA_DIST = $(service_in_files) org.gnome.ShellSearchProvider2.xml meson.build
 
 searchproviderdir = $(datadir)/gnome-shell/search-providers
 dist_searchprovider_DATA = gnome-control-center-search-provider.ini
diff --git a/search-provider/meson.build b/search-provider/meson.build
new file mode 100644
index 0000000..0fd8699
--- /dev/null
+++ b/search-provider/meson.build
@@ -0,0 +1,50 @@
+service_conf = configuration_data()
+service_conf.set('libexecdir', control_center_libexecdir)
+
+service = 'org.gnome.ControlCenter.SearchProvider.service'
+
+configure_file(
+  input: service + '.in',
+  output: service,
+  install: true,
+  install_dir: join_paths(control_center_datadir, 'dbus-1', 'services'),
+  configuration: service_conf
+)
+
+install_data(
+  'gnome-control-center-search-provider.ini',
+  install_dir: join_paths(control_center_datadir, 'gnome-shell', 'search-providers')
+)
+
+sources = files(
+  'cc-search-provider.c',
+  'control-center-search-provider.c'
+)
+
+# The upstream for the DBus interface definition is
+# at http://git.gnome.org/browse/gnome-shell/plain/data/org.gnome.ShellSearchProvider2.xml
+sources += gnome.gdbus_codegen(
+  'cc-shell-search-provider-generated',
+  'org.gnome.ShellSearchProvider2.xml',
+  interface_prefix: 'org.gnome.',
+  namespace: 'Cc'
+)
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libs = [
+  liblanguage,
+  libpanel_loader,
+  libshell
+]
+
+executable(
+  meson.project_name() + '-search-provider',
+  sources,
+  include_directories: [top_inc, common_inc],
+  dependencies: shell_deps,
+  c_args: cflags,
+  link_with: libs,
+  install: true,
+  install_dir: control_center_libexecdir
+)
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 9d6f7e0..363b158 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -161,7 +161,9 @@ EXTRA_DIST =                                        \
        panel-list.ui                           \
        window.ui                               \
        $(resource_files)                       \
-       list-panel.sh
+       list-panel.sh                           \
+       meson.build                             \
+       completions/meson.build
 
 CLEANFILES = $(BUILT_SOURCES) $(completion_DATA) $(servicefile_DATA)
 DISTCLEANFILES = gnome-control-center.desktop gnome-control-center.desktop.in
diff --git a/shell/alt/Makefile.am b/shell/alt/Makefile.am
index a0da46a..da2650c 100644
--- a/shell/alt/Makefile.am
+++ b/shell/alt/Makefile.am
@@ -17,6 +17,8 @@ libshell_alt_la_SOURCES =                     \
 
 libshell_alt_la_LIBADD = $(top_builddir)/subprojects/libgd/libgd.la
 
+EXTRA_DIST = meson.build
+
 test:
 
 -include $(top_srcdir)/git.mk
diff --git a/shell/alt/meson.build b/shell/alt/meson.build
new file mode 100644
index 0000000..36e4063
--- /dev/null
+++ b/shell/alt/meson.build
@@ -0,0 +1,14 @@
+sources = files('cc-window.c')
+
+cflags = [
+  '-DCC_ENABLE_ALT_CATEGORIES',
+  '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+libshell_alt = static_library(
+  'shell_alt',
+  sources: sources,
+  include_directories: [top_inc, common_inc, shell_inc],
+  dependencies: libgd_dep,
+  c_args: cflags
+)
diff --git a/shell/appdata/Makefile.am b/shell/appdata/Makefile.am
index 51bc83b..29e3d2b 100644
--- a/shell/appdata/Makefile.am
+++ b/shell/appdata/Makefile.am
@@ -6,7 +6,9 @@ appdata_in_files =                                              \
 
 test:
 
-EXTRA_DIST = $(appdata_in_files)
+EXTRA_DIST =                   \
+       $(appdata_in_files)     \
+       meson.build
 
 CLEANFILES =                                                   \
        gnome-control-center.appdata.xml
diff --git a/shell/appdata/meson.build b/shell/appdata/meson.build
new file mode 100644
index 0000000..7a0a334
--- /dev/null
+++ b/shell/appdata/meson.build
@@ -0,0 +1,10 @@
+info = meson.project_name() + '.metainfo.xml'
+
+custom_target(
+  info,
+  input: meson.project_name() + '.appdata.xml.in',
+  output: info,
+  command: intltool_xml_cmd,
+  install: true,
+  install_dir: join_paths(control_center_datadir, 'metainfo')
+)
diff --git a/shell/completions/meson.build b/shell/completions/meson.build
new file mode 100644
index 0000000..cb2c1be
--- /dev/null
+++ b/shell/completions/meson.build
@@ -0,0 +1,10 @@
+completion_conf = configuration_data()
+completion_conf.set('PANELS', ' '.join(panel_list))
+
+desktop_in = configure_file(
+  input: meson.project_name() + '.in',
+  output: meson.project_name(),
+  configuration: completion_conf,
+  install: true,
+  install_dir: join_paths(control_center_datadir, 'bash-completion', 'completions')
+)
diff --git a/shell/meson.build b/shell/meson.build
new file mode 100644
index 0000000..3dbd91c
--- /dev/null
+++ b/shell/meson.build
@@ -0,0 +1,176 @@
+subdir('appdata')
+subdir('alt')
+subdir('completions')
+
+service_conf = configuration_data()
+service_conf.set('bindir', control_center_bindir)
+
+service = 'org.gnome.ControlCenter.service'
+
+configure_file(
+  input: service + '.in',
+  output: service,
+  install: true,
+  install_dir: join_paths(control_center_datadir, 'dbus-1', 'services'),
+  configuration: service_conf
+)
+
+desktop = meson.project_name() + '.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: desktop + '.in',
+  configuration: desktop_conf
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: desktop,
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: control_center_desktopdir
+)
+
+cflags = ['-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)]
+
+libshell = static_library(
+  'shell',
+  sources: 'cc-shell-model.c',
+  include_directories: [top_inc, common_inc],
+  dependencies: common_deps,
+  c_args: cflags
+)
+
+common_sources = files(
+  'cc-application.c',
+  'cc-editable-entry.c',
+  'cc-hostname-entry.c',
+  'cc-panel-loader.c',
+  'cc-panel.c',
+  'cc-shell-category-view.c',
+  'cc-shell-item-view.c',
+  'cc-shell-log.c',
+  'cc-shell.c',
+  'hostname-helper.c',
+  'list-box-helper.c',
+  'main.c'
+)
+
+resource_data = files(
+  'help-overlay.ui',
+  'panel-list.ui',
+  'window.ui'
+)
+
+common_sources += gnome.compile_resources(
+  'resources',
+  meson.project_name() + '.gresource.xml',
+  source_dir: '.',
+  dependencies: resource_data,
+  export: true
+)
+
+sources = common_sources + files(
+  'cc-panel-list.c',
+  'cc-window.c'
+)
+
+shell_deps = common_deps + [
+  libgd_dep,
+  polkit_gobject_dep,
+  x11_dep
+]
+
+if have_cheese
+  shell_deps += cheese_deps
+endif
+
+libs = [
+  liblanguage,
+  libdevice,
+  libbackground,
+  libpower,
+  libcolor,
+  libdisplay,
+  libmouse_properties,
+  libnotifications,
+  libonline_accounts,
+  libregion,
+  libinfo,
+  libsound,
+  libkeyboard,
+  libuniversal_access,
+  libuser_accounts,
+  libdatetime,
+  libsearch,
+  libprivacy,
+  libsharing,
+  libprinters,
+  libshell
+]
+
+if have_wacom
+  libs += libwacom_properties
+endif
+
+if have_network_manager
+  libs += libnetwork
+endif
+
+if have_bluetooth
+  libs += libbluetooth
+endif
+
+executable(
+  meson.project_name(),
+  sources,
+  include_directories: [top_inc, common_inc],
+  dependencies: shell_deps,
+  c_args: cflags,
+  link_with: libs,
+  install: true,
+  install_dir: control_center_bindir
+)
+
+executable(
+  meson.project_name() + '-alt',
+  common_sources,
+  include_directories: top_inc,
+  dependencies: shell_deps,
+  c_args: cflags + ['-DCC_ENABLE_ALT_CATEGORIES'],
+  link_with: libs + [libshell_alt]
+)
+
+# Because it is confusing and somewhat problematic to directly add and compile
+# cc-panel-loader.o by another directory (i.e. the shell search provider), we
+# have to create a library and link it there, just like libshell.la.
+libpanel_loader = static_library(
+  'panel_loader',
+  sources: 'cc-panel-loader.c',
+  include_directories: top_inc,
+  dependencies: common_deps,
+  c_args: cflags + ['-DCC_PANEL_LOADER_NO_GTYPES']
+)
+
+test_unit = 'test-hostname'
+
+sources = files(
+  test_unit + '.c',
+  'hostname-helper.c'
+)
+
+cflags = cflags + [
+  '-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir()),
+  '-DTEST_TOPSRCDIR="@0@"'.format(meson.source_root())
+]
+
+exe = executable(
+  test_unit,
+  sources,
+  include_directories: top_inc,
+  dependencies: common_deps,
+  c_args: cflags
+)
+
+test(test_unit, exe)
diff --git a/subprojects/gvc b/subprojects/gvc
index ce8e488..3093bdb 160000
--- a/subprojects/gvc
+++ b/subprojects/gvc
@@ -1 +1 @@
-Subproject commit ce8e4880ce31e275c40825c4ed756c791107f810
+Subproject commit 3093bdb0777db1b1431bede19373ae5eac98accd
diff --git a/subprojects/libgd b/subprojects/libgd
index 752f65e..cc90107 160000
--- a/subprojects/libgd
+++ b/subprojects/libgd
@@ -1 +1 @@
-Subproject commit 752f65e91ea0d9a2ee8a2d21343bbd97bd0d038a
+Subproject commit cc90107531640bcba6c3c58e5cf6aec94d498763


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