[gnome-builder/wip/tingping/meson-build] build: Initial conversion to Meson



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

    build: Initial conversion to Meson

 .editorconfig                                |    4 +
 config.h.meson                               |  108 +++++
 contrib/egg/meson.build                      |   87 ++++
 contrib/gd/meson.build                       |   20 +
 contrib/libeditorconfig/meson.build          |   43 ++
 contrib/nautilus/meson.build                 |   13 +
 contrib/pnl/meson.build                      |   72 ++++
 contrib/search/meson.build                   |   13 +
 contrib/tmpl/meson.build                     |   93 +++++
 contrib/tmpl/tmpl-expr-scanner.l             |    3 -
 contrib/xml/meson.build                      |   13 +
 libide/application/ide-application-plugins.c |    2 +
 libide/editor/ide-editor-map-bin.c           |    2 +
 libide/meson.build                           |  551 ++++++++++++++++++++++++++
 libide/workers/ide-worker-manager.c          |    2 +
 meson.build                                  |   63 +++
 meson_options.txt                            |    8 +
 17 files changed, 1094 insertions(+), 3 deletions(-)
---
diff --git a/.editorconfig b/.editorconfig
index 2053f10..615f597 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -39,3 +39,7 @@ tab_size = 4
 indent_size = 2
 tab_size = 2
 indent_style = space
+
+[meson.build]
+indent_size = 2
+indent_style = space
diff --git a/config.h.meson b/config.h.meson
new file mode 100644
index 0000000..4e2ef40
--- /dev/null
+++ b/config.h.meson
@@ -0,0 +1,108 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#mesondefine ENABLE_NLS
+
+/* GETTEXT package name */
+#mesondefine GETTEXT_PACKAGE
+
+/* Name of GNU make on this system */
+#mesondefine GNU_MAKE_NAME
+
+/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
+   CoreFoundation framework. */
+#mesondefine HAVE_CFLOCALECOPYCURRENT
+
+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
+   the CoreFoundation framework. */
+#mesondefine HAVE_CFPREFERENCESCOPYAPPVALUE
+
+/* define if the compiler supports basic C++11 syntax */
+#mesondefine HAVE_CXX11
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
+#mesondefine HAVE_DCGETTEXT
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#mesondefine HAVE_DLFCN_H
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#mesondefine HAVE_GETTEXT
+
+/* Define if you have the iconv() function and it works. */
+#mesondefine HAVE_ICONV
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#mesondefine HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#mesondefine HAVE_MEMORY_H
+
+/* Define to 1 if you have the `sched_getcpu' function. */
+#mesondefine HAVE_SCHED_GETCPU
+
+/* Define to 1 if you have the `shm_open' function. */
+#mesondefine HAVE_SHM_OPEN
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#mesondefine HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#mesondefine HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#mesondefine HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#mesondefine HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#mesondefine HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#mesondefine HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#mesondefine HAVE_UNISTD_H
+
+/* Name of package */
+#mesondefine PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#mesondefine PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#mesondefine PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#mesondefine PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#mesondefine PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#mesondefine PACKAGE_URL
+
+/* Define to the version of this package. */
+#mesondefine PACKAGE_VERSION
+
+#mesondefine PACKAGE_DATADIR
+
+#mesondefine PACKAGE_LIBDIR
+
+#mesondefine PACKAGE_LIBEXECDIR
+
+#mesondefine PACKAGE_LOCALE_DIR
+
+/* Define to 1 if you have the ANSI C header files. */
+#mesondefine STDC_HEADERS
+
+/* Version number of package */
+#mesondefine VERSION
+
+#mesondefine SRCDIR
+
+#mesondefine BUILDDIR
+
diff --git a/contrib/egg/meson.build b/contrib/egg/meson.build
new file mode 100644
index 0000000..fdac301
--- /dev/null
+++ b/contrib/egg/meson.build
@@ -0,0 +1,87 @@
+libegg_headers = [
+  'egg-animation.h',
+  'egg-binding-group.h',
+  'egg-box.h',
+  'egg-centering-bin.h',
+  'egg-column-layout.h',
+  'egg-counter.h',
+  'egg-date-time.h',
+  'egg-empty-state.h',
+  'egg-entry-box.h',
+  'egg-file-chooser-entry.h',
+  'egg-frame-source.h',
+  'egg-heap.h',
+  'egg-list-box.h',
+  'egg-menu-manager.h',
+  'egg-pill-box.h',
+  'egg-priority-box.h',
+  'egg-private.h',
+  'egg-radio-box.h',
+  'egg-scrolled-window.h',
+  'egg-search-bar.h',
+  'egg-settings-flag-action.h',
+  'egg-settings-sandwich.h',
+  'egg-signal-group.h',
+  'egg-simple-label.h',
+  'egg-simple-popover.h',
+  'egg-slider.h',
+  'egg-state-machine-buildable.h',
+  'egg-state-machine.h',
+  'egg-task-cache.h',
+  'egg-three-grid.h',
+  'egg-widget-action-group.h',
+]
+
+install_headers(libegg_headers,
+  subdir: 'gnome-builder' + meson.project_version() + '/egg'
+)
+
+libegg_resources = gnome.compile_resources('egg-resources', 'egg.gresource.xml',
+  source_dir: meson.current_source_dir(),
+  c_name: 'egg',
+)
+
+libegg_sources = [
+  'egg-animation.c',
+  'egg-binding-group.c',
+  'egg-box.c',
+  'egg-centering-bin.c',
+  'egg-column-layout.c',
+  'egg-counter.c',
+  'egg-date-time.c',
+  'egg-empty-state.c',
+  'egg-entry-box.c',
+  'egg-file-chooser-entry.c',
+  'egg-frame-source.c',
+  'egg-heap.c',
+  'egg-list-box.c',
+  'egg-menu-manager.c',
+  'egg-pill-box.c',
+  'egg-priority-box.c',
+  'egg-radio-box.c',
+  'egg-scrolled-window.c',
+  'egg-search-bar.c',
+  'egg-settings-flag-action.c',
+  'egg-settings-sandwich.c',
+  'egg-signal-group.c',
+  'egg-simple-label.c',
+  'egg-simple-popover.c',
+  'egg-slider.c',
+  'egg-state-machine-buildable.c',
+  'egg-state-machine.c',
+  'egg-task-cache.c',
+  'egg-three-grid.c',
+  'egg-widget-action-group.c',
+  libegg_resources,
+]
+
+libegg_deps = [
+  dependency('gtk+-3.0'),
+  dependency('gio-2.0'),
+]
+
+libegg = shared_library('libegg', libegg_sources,
+  dependencies: libegg_deps,
+  install: true,
+  install_dir: get_option('libdir') + '/gnome-builder',
+)
diff --git a/contrib/gd/meson.build b/contrib/gd/meson.build
new file mode 100644
index 0000000..7eb5c1f
--- /dev/null
+++ b/contrib/gd/meson.build
@@ -0,0 +1,20 @@
+libgd_resources = gnome.compile_resources('gd-resources',
+  'gd-tagged-entry.gresource.xml',
+  source_dir: meson.current_source_dir(),
+  c_name: 'gd',
+)
+
+libgd_sources = [
+  'gd-tagged-entry.c',
+  libgd_resources,
+]
+
+libgd_deps = [
+  dependency('gio-2.0'),
+  dependency('gtk+-3.0'),
+]
+
+libgd = static_library('gd', libgd_sources,
+  dependencies: libgd_deps,
+  c_args: ['-fPIC'],
+)
diff --git a/contrib/gstyle/meson.build b/contrib/gstyle/meson.build
new file mode 100644
index 0000000..e69de29
diff --git a/contrib/libeditorconfig/meson.build b/contrib/libeditorconfig/meson.build
new file mode 100644
index 0000000..980cfb2
--- /dev/null
+++ b/contrib/libeditorconfig/meson.build
@@ -0,0 +1,43 @@
+if get_option('with_editorconfig')
+
+libeditorconfig_sources = [
+  'ec_glob.c',
+  'ec_glob.h',
+  'editorconfig.c',
+  'editorconfig.h',
+  'editorconfig/editorconfig.h',
+  'editorconfig/editorconfig_handle.h',
+  'editorconfig_handle.c',
+  'editorconfig_handle.h',
+  'global.h',
+  'ini.c',
+  'ini.h',
+  'misc.c',
+  'misc.h',
+  'utarray.h',
+]
+
+libeditorconfig_deps = [
+  dependency('libpcre')
+]
+
+# TODO: Actually test these
+libeditorconfig_args = [
+       '-DHAVE_STRCASECMP',
+       '-DHAVE_STRICMP',
+       '-DHAVE_STRDUP',
+       '-DHAVE_STRNDUP',
+       '-DUNIX',
+       '-Deditorconfig_VERSION_MAJOR=0',
+       '-Deditorconfig_VERSION_MINOR=0',
+       '-Deditorconfig_VERSION_PATCH=0',
+       '-Deditorconfig_VERSION_SUFFIX=0',
+       '-fPIC',
+]
+
+libeditorconfig = static_library('editorconfig',
+  libeditorconfig_sources,
+  dependencies: libeditorconfig_deps,
+  c_args: libeditorconfig_args,
+)
+endif
diff --git a/contrib/nautilus/meson.build b/contrib/nautilus/meson.build
new file mode 100644
index 0000000..7ff9de8
--- /dev/null
+++ b/contrib/nautilus/meson.build
@@ -0,0 +1,13 @@
+libnautilus_sources = [
+  'nautilus-floating-bar.c',
+]
+
+libnautilus_deps = [
+  dependency('gio-2.0'),
+  dependency('gtk+-3.0'),
+]
+
+libnautilus = static_library('nautilus', libnautilus_sources,
+  dependencies: libnautilus_deps,
+  c_args: ['-fPIC'],
+)
diff --git a/contrib/pnl/meson.build b/contrib/pnl/meson.build
new file mode 100644
index 0000000..9c38db2
--- /dev/null
+++ b/contrib/pnl/meson.build
@@ -0,0 +1,72 @@
+libpnl_headers = [
+  'pnl-animation.h',
+  'pnl-dock-bin.h',
+  'pnl-dock-bin-edge.h',
+  'pnl-dock-item.h',
+  'pnl-dock-manager.h',
+  'pnl-dock-overlay.h',
+  'pnl-dock-paned.h',
+  'pnl-dock-revealer.h',
+  'pnl-dock-stack.h',
+  'pnl-dock-types.h',
+  'pnl-dock-widget.h',
+  'pnl-dock-window.h',
+  'pnl-dock.h',
+  'pnl-frame-source.h',
+  'pnl-multi-paned.h',
+  'pnl-tab-strip.h',
+  'pnl-tab.h',
+  'pnl-version.h',
+  'pnl.h',
+]
+
+install_headers(libpnl_headers,
+  subdir: 'gnome-builder-' + meson.project_version() + '/pnl',
+)
+
+libpnl_resources = gnome.compile_resources('pnl-resources',
+  'pnl.gresource.xml',
+  source_dir: meson.current_source_dir(),
+  c_name: 'pnl',
+)
+
+libpnl_sources = [
+  'pnl-animation.c',
+  'pnl-dock-bin-edge.c',
+  'pnl-dock-bin-edge-private.h',
+  'pnl-dock-bin.c',
+  'pnl-dock-item.c',
+  'pnl-dock-manager.c',
+  'pnl-dock-overlay-edge-private.h',
+  'pnl-dock-overlay-edge.c',
+  'pnl-dock-overlay.c',
+  'pnl-dock-paned-private.h',
+  'pnl-dock-paned.c',
+  'pnl-dock-revealer.c',
+  'pnl-dock-stack.c',
+  'pnl-dock-tab-strip.c',
+  'pnl-dock-tab-strip.h',
+  'pnl-dock-transient-grab.c',
+  'pnl-dock-transient-grab.h',
+  'pnl-dock-widget.c',
+  'pnl-dock-window.c',
+  'pnl-dock.c',
+  'pnl-frame-source.c',
+  'pnl-multi-paned.c',
+  'pnl-tab-strip.c',
+  'pnl-tab.c',
+  'pnl-util-private.h',
+  'pnl-util.c',
+  libpnl_resources,
+]
+
+libpnl_deps = [
+  dependency('gtk+-3.0'),
+]
+
+libpnl = shared_library('pnl', libpnl_sources,
+  dependencies: libpnl_deps,
+  c_args: ['-DPNL_COMPILATION'],
+  install: true,
+  install_dir: get_option('libdir') + '/gnome-builder',
+)
diff --git a/contrib/rg/meson.build b/contrib/rg/meson.build
new file mode 100644
index 0000000..e69de29
diff --git a/contrib/search/meson.build b/contrib/search/meson.build
new file mode 100644
index 0000000..da88ac8
--- /dev/null
+++ b/contrib/search/meson.build
@@ -0,0 +1,13 @@
+libsearch_sources = [
+  'fuzzy.c',
+  'trie.c',
+]
+
+libsearch_deps = [
+  dependency('gobject-2.0'),
+]
+
+libsearch = static_library('search', libsearch_sources,
+  dependencies: libsearch_deps,
+  c_args: ['-fPIC'],
+)
diff --git a/contrib/tmpl/meson.build b/contrib/tmpl/meson.build
new file mode 100644
index 0000000..35d3dc1
--- /dev/null
+++ b/contrib/tmpl/meson.build
@@ -0,0 +1,93 @@
+libtmpl_headers = [
+  'tmpl-error.h',
+  'tmpl-expr-types.h',
+  'tmpl-expr.h',
+  'tmpl-glib.h',
+  'tmpl-scope.h',
+  'tmpl-symbol.h',
+  'tmpl-template-locator.h',
+  'tmpl-template.h',
+  'tmpl-enums.h',
+]
+
+libtmpl_enum_headers = [
+  'tmpl-error.h',
+  'tmpl-expr-types.h',
+]
+
+gnome.mkenums('tmpl-enums',
+  sources: libtmpl_enum_headers,
+)
+
+install_headers(libtmpl_headers,
+  subdir: 'gnome-builder-' + meson.project_version() + '/template-glib',
+)
+
+libtmpl_sources = [
+  'tmpl-branch-node.c',
+  'tmpl-branch-node.h',
+  'tmpl-condition-node.c',
+  'tmpl-condition-node.h',
+  'tmpl-debug.h',
+  'tmpl-error.c',
+  'tmpl-expr-eval.c',
+  'tmpl-expr-node.c',
+  'tmpl-expr-node.h',
+  'tmpl-expr-parser-private.h',
+  'tmpl-expr-private.h',
+  'tmpl-expr.c',
+  'tmpl-gi-private.h',
+  'tmpl-gi.c',
+  'tmpl-iter-node.c',
+  'tmpl-iter-node.h',
+  'tmpl-iterator.c',
+  'tmpl-iterator.h',
+  'tmpl-lexer.c',
+  'tmpl-lexer.h',
+  'tmpl-node.c',
+  'tmpl-node.h',
+  'tmpl-parser.c',
+  'tmpl-parser.h',
+  'tmpl-scope.c',
+  'tmpl-symbol.c',
+  'tmpl-template-locator.c',
+  'tmpl-template.c',
+  'tmpl-text-node.c',
+  'tmpl-text-node.h',
+  'tmpl-token-input-stream.c',
+  'tmpl-token-input-stream.h',
+  'tmpl-token.c',
+  'tmpl-token.h',
+  'tmpl-util-private.h',
+  'tmpl-util.c',
+]
+
+libtmpl_deps = [
+  dependency('gio-2.0'),
+  dependency('gobject-introspection-1.0'),
+]
+
+flex = find_program('flex')
+bison = find_program('bison')
+
+lgen = generator(flex,
+  output : '@BASENAME@.c',
+  arguments : ['-o', '@OUTPUT@', '@INPUT@']
+)
+
+pgen = generator(bison,
+  output : ['@BASENAME@.c', '@BASENAME@.h'],
+  arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@']
+)
+
+libtmpl_sources = libtmpl_sources + [
+  lgen.process('tmpl-expr-scanner.l'),
+  pgen.process('tmpl-expr-parser.y'),
+]
+
+libtmpl = shared_library('tmpl', libtmpl_sources,
+  dependencies: libtmpl_deps,
+  c_args: ['-DTMPL_GLIB_COMPILATION'],
+  install: true,
+  install_dir: pkglibdir, # Was this the wrong dir?
+)
diff --git a/contrib/tmpl/tmpl-expr-scanner.l b/contrib/tmpl/tmpl-expr-scanner.l
index afe2435..9197390 100644
--- a/contrib/tmpl/tmpl-expr-scanner.l
+++ b/contrib/tmpl/tmpl-expr-scanner.l
@@ -5,9 +5,6 @@
 %option yylineno
 %option nodefault
 
-%option header-file="tmpl-expr-scanner.h"
-%option outfile="tmpl-expr-scanner.c"
-
 %{
 # include "tmpl-error.h"
 # include "tmpl-expr-private.h"
diff --git a/contrib/xml/meson.build b/contrib/xml/meson.build
new file mode 100644
index 0000000..80af309
--- /dev/null
+++ b/contrib/xml/meson.build
@@ -0,0 +1,13 @@
+libxml_sources = [
+  'xml-reader.c',
+]
+
+libxml_deps = [
+  dependency('gio-2.0'),
+  dependency('libxml-2.0'),
+]
+
+libxml = static_library('xml', libxml_sources,
+  dependencies: libxml_deps,
+  c_args: ['-fPIC'],
+)
diff --git a/libide/application/ide-application-plugins.c b/libide/application/ide-application-plugins.c
index 510d297..bff4baf 100644
--- a/libide/application/ide-application-plugins.c
+++ b/libide/application/ide-application-plugins.c
@@ -18,6 +18,8 @@
 
 #define G_LOG_DOMAIN "ide-application"
 
+#include "config.h"
+
 #include <libpeas/peas.h>
 #include <girepository.h>
 
diff --git a/libide/editor/ide-editor-map-bin.c b/libide/editor/ide-editor-map-bin.c
index 8a3592c..6f0adbb 100644
--- a/libide/editor/ide-editor-map-bin.c
+++ b/libide/editor/ide-editor-map-bin.c
@@ -18,6 +18,8 @@
 
 #define G_LOG_DOMAIN "ide-editor-map-bin"
 
+#include "config.h"
+
 #include <glib/gi18n.h>
 #include <pango/pangofc-fontmap.h>
 
diff --git a/libide/meson.build b/libide/meson.build
new file mode 100644
index 0000000..60e3c48
--- /dev/null
+++ b/libide/meson.build
@@ -0,0 +1,551 @@
+libide_public_headers = [
+  'ide-context.h',
+  'ide-debug.h',
+  'ide-enums.h',
+  'ide-global.h',
+  'ide-macros.h',
+  'ide-object.h',
+  'ide-service.h',
+  'ide-types.h',
+  'ide.h',
+  'application/ide-application-addin.h',
+  'application/ide-application-credits.h',
+  'application/ide-application-tool.h',
+  'application/ide-application.h',
+  'buffers/ide-buffer-change-monitor.h',
+  'buffers/ide-buffer-manager.h',
+  'buffers/ide-buffer.h',
+  'buffers/ide-unsaved-file.h',
+  'buffers/ide-unsaved-files.h',
+  'buildsystem/ide-build-command.h',
+  'buildsystem/ide-build-command-queue.h',
+  'buildsystem/ide-build-manager.h',
+  'buildsystem/ide-build-result-addin.h',
+  'buildsystem/ide-build-result.h',
+  'buildsystem/ide-build-system.h',
+  'buildsystem/ide-build-target.h',
+  'buildsystem/ide-builder.h',
+  'buildsystem/ide-configuration-manager.h',
+  'buildsystem/ide-configuration.h',
+  'buildsystem/ide-environment-variable.h',
+  'buildsystem/ide-environment.h',
+  'devices/ide-device-manager.h',
+  'devices/ide-device-provider.h',
+  'devices/ide-device.h',
+  'diagnostics/ide-diagnostic-provider.h',
+  'diagnostics/ide-diagnostic.h',
+  'diagnostics/ide-diagnostician.h',
+  'diagnostics/ide-diagnostics.h',
+  'diagnostics/ide-fixit.h',
+  'diagnostics/ide-source-location.h',
+  'diagnostics/ide-source-range.h',
+  'directory/ide-directory-build-system.h',
+  'directory/ide-directory-vcs.h',
+  'doap/ide-doap-person.h',
+  'doap/ide-doap.h',
+  'editor/ide-editor-perspective.h',
+  'editor/ide-editor-view-addin.h',
+  'editor/ide-editor-view.h',
+  'files/ide-file-settings.h',
+  'files/ide-file.h',
+  'files/ide-indent-style.h',
+  'genesis/ide-genesis-addin.h',
+  'highlighting/ide-highlight-engine.h',
+  'highlighting/ide-highlight-index.h',
+  'highlighting/ide-highlighter.h',
+  'history/ide-back-forward-item.h',
+  'history/ide-back-forward-list.h',
+  'local/ide-local-device.h',
+  'logging/ide-log.h',
+  'plugins/ide-extension-adapter.h',
+  'plugins/ide-extension-set-adapter.h',
+  'preferences/ide-preferences-addin.h',
+  'preferences/ide-preferences-bin.h',
+  'preferences/ide-preferences-entry.h',
+  'preferences/ide-preferences-file-chooser-button.h',
+  'preferences/ide-preferences-flow-box.h',
+  'preferences/ide-preferences-font-button.h',
+  'preferences/ide-preferences-group.h',
+  'preferences/ide-preferences-page.h',
+  'preferences/ide-preferences-spin-button.h',
+  'preferences/ide-preferences-switch.h',
+  'preferences/ide-preferences.h',
+  'projects/ide-project-file.h',
+  'projects/ide-project-files.h',
+  'projects/ide-project-info.h',
+  'projects/ide-project-item.h',
+  'projects/ide-project-miner.h',
+  'projects/ide-project.h',
+  'projects/ide-recent-projects.h',
+  'runner/ide-run-button.h',
+  'runner/ide-run-manager.h',
+  'runner/ide-runner.h',
+  'runner/ide-runner-addin.h',
+  'runtimes/ide-runtime-manager.h',
+  'runtimes/ide-runtime-provider.h',
+  'runtimes/ide-runtime.h',
+  'scripting/ide-script-manager.h',
+  'scripting/ide-script.h',
+  'search/ide-omni-search-display.h',
+  'search/ide-omni-search-entry.h',
+  'search/ide-omni-search-group.h',
+  'search/ide-omni-search-row.h',
+  'search/ide-pattern-spec.h',
+  'search/ide-search-context.h',
+  'search/ide-search-engine.h',
+  'search/ide-search-provider.h',
+  'search/ide-search-reducer.h',
+  'search/ide-search-result.h',
+  'snippets/ide-source-snippet-chunk.h',
+  'snippets/ide-source-snippet-context.h',
+  'snippets/ide-source-snippet.h',
+  'snippets/ide-source-snippets-manager.h',
+  'snippets/ide-source-snippets.h',
+  'sourceview/ide-completion-item.h',
+  'sourceview/ide-completion-provider.h',
+  'sourceview/ide-completion-results.h',
+  'sourceview/ide-indenter.h',
+  'sourceview/ide-language.h',
+  'sourceview/ide-source-map.h',
+  'sourceview/ide-source-style-scheme.h',
+  'sourceview/ide-source-view-mode.h',
+  'sourceview/ide-source-view.h',
+  'subprocess/ide-subprocess.h',
+  'subprocess/ide-subprocess-launcher.h',
+  'symbols/ide-symbol-node.h',
+  'symbols/ide-symbol-resolver.h',
+  'symbols/ide-symbol-tree.h',
+  'symbols/ide-symbol.h',
+  'symbols/ide-tags-builder.h',
+  'template/ide-project-template.h',
+  'template/ide-template-base.h',
+  'template/ide-template-provider.h',
+  'threading/ide-thread-pool.h',
+  'transfers/ide-transfer.h',
+  'transfers/ide-transfer-manager.h',
+  'transfers/ide-transfer-row.h',
+  'transfers/ide-transfers-button.h',
+  'transfers/ide-transfers-progress-icon.h',
+  'tree/ide-tree-builder.h',
+  'tree/ide-tree-node.h',
+  'tree/ide-tree-types.h',
+  'tree/ide-tree.h',
+  'util/ide-cairo.h',
+  'util/ide-dnd.h',
+  'util/ide-file-manager.h',
+  'util/ide-flatpak.h',
+  'util/ide-glib.h',
+  'util/ide-gtk.h',
+  'util/ide-line-reader.h',
+  'util/ide-list-inline.h',
+  'util/ide-pango.h',
+  'util/ide-posix.h',
+  'util/ide-progress.h',
+  'util/ide-rgba.h',
+  'util/ide-settings.h',
+  'util/ide-uri.h',
+  'vcs/ide-vcs-config.h',
+  'vcs/ide-vcs-initializer.h',
+  'vcs/ide-vcs-uri.h',
+  'vcs/ide-vcs.h',
+  'workbench/ide-layout-grid.h',
+  'workbench/ide-layout-pane.h',
+  'workbench/ide-layout-stack-split.h',
+  'workbench/ide-layout-stack.h',
+  'workbench/ide-layout-stack-addin.h',
+  'workbench/ide-layout-view.h',
+  'workbench/ide-layout.h',
+  'workbench/ide-omni-bar.h',
+  'workbench/ide-perspective.h',
+  'workbench/ide-workbench-addin.h',
+  'workbench/ide-workbench-header-bar.h',
+  'workbench/ide-workbench.h',
+  'workers/ide-worker.h',
+]
+
+libide_enum_headers = [
+  'buffers/ide-buffer.h',
+  'buildsystem/ide-build-result.h',
+  'devices/ide-device.h',
+  'diagnostics/ide-diagnostic.h',
+  'doap/ide-doap.h',
+  'files/ide-indent-style.h',
+  'highlighting/ide-highlighter.h',
+  'runtimes/ide-runtime.h',
+  'sourceview/ide-source-view.h',
+  'symbols/ide-symbol.h',
+  'threading/ide-thread-pool.h',
+  'vcs/ide-vcs-config.h',
+  'workbench/ide-layout-stack-split.h',
+]
+
+# https://github.com/mesonbuild/meson/pull/718
+libide_enums = gnome.mkenums('libide-enums',
+  sources: libide_enum_headers,
+)
+
+install_headers(libide_public_headers,
+  subdir: 'gnome-builder-' + meson.project_version() + '/libide'
+)
+
+libide_resources = gnome.compile_resources('ide-resources',
+  'resources/libide.gresource.xml',
+  source_dir: meson.current_source_dir() + '/resources',
+  c_name: 'ide',
+)
+
+libide_icons_resources = gnome.compile_resources('ide-icons-resources',
+  meson.source_root() + '/data/icons/hicolor/icons.gresource.xml',
+  source_dir: meson.source_root() + '/data/icons/hicolor',
+  c_name: 'ide_icons',
+)
+
+libide_public_sources = [
+  'application/ide-application-addin.c',
+  'application/ide-application-tool.c',
+  'application/ide-application.c',
+  'application/ide-application-open.c',
+  'buffers/ide-buffer-change-monitor.c',
+  'buffers/ide-buffer-manager.c',
+  'buffers/ide-buffer.c',
+  'buffers/ide-unsaved-file.c',
+  'buffers/ide-unsaved-files.c',
+  'buildsystem/ide-build-command.c',
+  'buildsystem/ide-build-command-queue.c',
+  'buildsystem/ide-build-manager.c',
+  'buildsystem/ide-build-result-addin.c',
+  'buildsystem/ide-build-result.c',
+  'buildsystem/ide-build-system.c',
+  'buildsystem/ide-build-target.c',
+  'buildsystem/ide-builder.c',
+  'buildsystem/ide-configuration-manager.c',
+  'buildsystem/ide-configuration.c',
+  'buildsystem/ide-environment-variable.c',
+  'buildsystem/ide-environment.c',
+  'devices/ide-device-manager.c',
+  'devices/ide-device-provider.c',
+  'devices/ide-device.c',
+  'diagnostics/ide-diagnostic-provider.c',
+  'diagnostics/ide-diagnostic.c',
+  'diagnostics/ide-diagnostician.c',
+  'diagnostics/ide-diagnostics.c',
+  'diagnostics/ide-fixit.c',
+  'diagnostics/ide-source-location.c',
+  'diagnostics/ide-source-range.c',
+  'directory/ide-directory-build-system.c',
+  'directory/ide-directory-plugin.c',
+  'directory/ide-directory-vcs.c',
+  'doap/ide-doap-person.c',
+  'doap/ide-doap.c',
+  'editor/ide-editor-perspective.c',
+  'editor/ide-editor-view-addin.c',
+  'editor/ide-editor-view.c',
+  'files/ide-file-settings.c',
+  'files/ide-file.c',
+  'genesis/ide-genesis-addin.c',
+  'highlighting/ide-highlight-engine.c',
+  'highlighting/ide-highlight-index.c',
+  'highlighting/ide-highlighter.c',
+  'history/ide-back-forward-item.c',
+  'history/ide-back-forward-list-load.c',
+  'history/ide-back-forward-list-save.c',
+  'history/ide-back-forward-list.c',
+  'ide-context.c',
+  'ide-enums.c',
+  'ide-object.c',
+  'ide-service.c',
+  'ide.c',
+  'local/ide-local-device.c',
+  'logging/ide-log.c',
+  'plugins/ide-extension-adapter.c',
+  'plugins/ide-extension-set-adapter.c',
+  'preferences/ide-preferences-addin.c',
+  'preferences/ide-preferences-entry.c',
+  'preferences/ide-preferences-file-chooser-button.c',
+  'preferences/ide-preferences-flow-box.c',
+  'preferences/ide-preferences-font-button.c',
+  'preferences/ide-preferences-group.c',
+  'preferences/ide-preferences-page.c',
+  'preferences/ide-preferences-spin-button.c',
+  'preferences/ide-preferences-switch.c',
+  'preferences/ide-preferences.c',
+  'projects/ide-project-file.c',
+  'projects/ide-project-files.c',
+  'projects/ide-project-info.c',
+  'projects/ide-project-item.c',
+  'projects/ide-project-miner.c',
+  'projects/ide-project.c',
+  'projects/ide-recent-projects.c',
+  'runner/ide-run-button.c',
+  'runner/ide-run-manager.c',
+  'runner/ide-runner.c',
+  'runner/ide-runner-addin.c',
+  'runtimes/ide-runtime-manager.c',
+  'runtimes/ide-runtime-provider.c',
+  'runtimes/ide-runtime.c',
+  'scripting/ide-script-manager.c',
+  'scripting/ide-script.c',
+  'search/ide-omni-search-display.c',
+  'search/ide-omni-search-entry.c',
+  'search/ide-omni-search-group.c',
+  'search/ide-omni-search-row.c',
+  'search/ide-pattern-spec.c',
+  'search/ide-search-context.c',
+  'search/ide-search-engine.c',
+  'search/ide-search-provider.c',
+  'search/ide-search-result.c',
+  'snippets/ide-source-snippet-chunk.c',
+  'snippets/ide-source-snippet-context.c',
+  'snippets/ide-source-snippet.c',
+  'snippets/ide-source-snippets-manager.c',
+  'snippets/ide-source-snippets.c',
+  'sourceview/ide-completion-item.c',
+  'sourceview/ide-completion-provider.c',
+  'sourceview/ide-completion-results.c',
+  'sourceview/ide-indenter.c',
+  'sourceview/ide-language.c',
+  'sourceview/ide-source-map.c',
+  'sourceview/ide-source-style-scheme.c',
+  'sourceview/ide-source-view-mode.c',
+  'sourceview/ide-source-view.c',
+  'subprocess/ide-subprocess.c',
+  'subprocess/ide-subprocess-launcher.c',
+  'symbols/ide-symbol-node.c',
+  'symbols/ide-symbol-resolver.c',
+  'symbols/ide-symbol-tree.c',
+  'symbols/ide-symbol.c',
+  'symbols/ide-tags-builder.c',
+  'template/ide-project-template.c',
+  'template/ide-template-base.c',
+  'template/ide-template-provider.c',
+  'threading/ide-thread-pool.c',
+  'transfers/ide-transfer.c',
+  'transfers/ide-transfer-manager.c',
+  'transfers/ide-transfer-row.c',
+  'transfers/ide-transfers-button.c',
+  'transfers/ide-transfers-progress-icon.c',
+  'tree/ide-tree-builder.c',
+  'tree/ide-tree-node.c',
+  'tree/ide-tree.c',
+  'util/ide-cairo.c',
+  'util/ide-dnd.c',
+  'util/ide-file-manager.c',
+  'util/ide-flatpak.c',
+  'util/ide-glib.c',
+  'util/ide-gtk.c',
+  'util/ide-line-reader.c',
+  'util/ide-pango.c',
+  'util/ide-posix.c',
+  'util/ide-progress.c',
+  'util/ide-rgba.c',
+  'util/ide-settings.c',
+  'util/ide-uri.c',
+  'vcs/ide-vcs-config.c',
+  'vcs/ide-vcs-initializer.c',
+  'vcs/ide-vcs-uri.c',
+  'vcs/ide-vcs.c',
+  'workbench/ide-layout-grid.c',
+  'workbench/ide-layout-pane.c',
+  'workbench/ide-layout-stack.c',
+  'workbench/ide-layout-stack-addin.c',
+  'workbench/ide-layout-view.c',
+  'workbench/ide-layout.c',
+  'workbench/ide-omni-bar.c',
+  'workbench/ide-perspective.c',
+  'workbench/ide-workbench-addin.c',
+  'workbench/ide-workbench-header-bar.c',
+  'workbench/ide-workbench-open.c',
+  'workbench/ide-workbench.c',
+  'workers/ide-worker.c',
+]
+
+libide_sources = libide_public_sources + [
+  'application/ide-application-actions.c',
+  'application/ide-application-actions.h',
+  'application/ide-application-command-line.c',
+  'application/ide-application-plugins.c',
+  'application/ide-application-private.h',
+  'application/ide-application-tests.c',
+  'application/ide-application-tests.h',
+  'editor/ide-editor-frame-actions.c',
+  'editor/ide-editor-frame-actions.h',
+  'editor/ide-editor-frame-private.h',
+  'editor/ide-editor-frame.c',
+  'editor/ide-editor-frame.h',
+  'editor/ide-editor-map-bin.c',
+  'editor/ide-editor-map-bin.h',
+  'editor/ide-editor-plugin.c',
+  'editor/ide-editor-layout-stack-addin.c',
+  'editor/ide-editor-layout-stack-addin.h',
+  'editor/ide-editor-layout-stack-controls.c',
+  'editor/ide-editor-layout-stack-controls.h',
+  'editor/ide-editor-print-operation.c',
+  'editor/ide-editor-print-operation.h',
+  'editor/ide-editor-tweak-widget.c',
+  'editor/ide-editor-tweak-widget.h',
+  'editor/ide-editor-view-actions.c',
+  'editor/ide-editor-view-actions.h',
+  'editor/ide-editor-view-addin-private.h',
+  'editor/ide-editor-view-private.h',
+  'editor/ide-editor-workbench-addin.c',
+  'editor/ide-editor-workbench-addin.h',
+  'gconstructor.h',
+  'greeter/ide-greeter-perspective.c',
+  'greeter/ide-greeter-perspective.h',
+  'greeter/ide-greeter-project-row.c',
+  'greeter/ide-greeter-project-row.h',
+  'gsettings/ide-gsettings-file-settings.c',
+  'gsettings/ide-gsettings-file-settings.h',
+  'gsettings/ide-language-defaults.c',
+  'gsettings/ide-language-defaults.h',
+  'history/ide-back-forward-list-private.h',
+  'ide-internal.h',
+  'keybindings/ide-keybindings.c',
+  'keybindings/ide-keybindings.h',
+  'keybindings/ide-shortcuts-window.c',
+  'keybindings/ide-shortcuts-window.h',
+  'modelines/ide-modelines-file-settings.c',
+  'modelines/ide-modelines-file-settings.h',
+  'modelines/modeline-parser.c',
+  'modelines/modeline-parser.h',
+  'plugins/ide-extension-util.c',
+  'plugins/ide-extension-util.h',
+  'preferences/ide-preferences-bin-private.h',
+  'preferences/ide-preferences-bin.c',
+  'preferences/ide-preferences-builtin.c',
+  'preferences/ide-preferences-builtin.h',
+  'preferences/ide-preferences-group-private.h',
+  'preferences/ide-preferences-language-row.c',
+  'preferences/ide-preferences-language-row.h',
+  'preferences/ide-preferences-page-private.h',
+  'preferences/ide-preferences-perspective.c',
+  'preferences/ide-preferences-perspective.h',
+  'runner/ide-run-manager-private.h',
+  'search/ide-search-reducer.c',
+  'snippets/ide-source-snippet-completion-item.c',
+  'snippets/ide-source-snippet-completion-item.h',
+  'snippets/ide-source-snippet-completion-provider.c',
+  'snippets/ide-source-snippet-completion-provider.h',
+  'snippets/ide-source-snippet-parser.c',
+  'snippets/ide-source-snippet-parser.h',
+  'snippets/ide-source-snippet-private.h',
+  'sourceview/ide-line-change-gutter-renderer.c',
+  'sourceview/ide-line-change-gutter-renderer.h',
+  'sourceview/ide-line-diagnostics-gutter-renderer.c',
+  'sourceview/ide-line-diagnostics-gutter-renderer.h',
+  'sourceview/ide-source-iter.c',
+  'sourceview/ide-source-iter.h',
+  'sourceview/ide-source-view-capture.c',
+  'sourceview/ide-source-view-capture.h',
+  'sourceview/ide-source-view-movements.c',
+  'sourceview/ide-source-view-movements.h',
+  'sourceview/ide-text-iter.c',
+  'sourceview/ide-text-iter.h',
+  'sourceview/ide-text-util.c',
+  'sourceview/ide-text-util.h',
+  'subprocess/ide-breakout-subprocess.c',
+  'subprocess/ide-breakout-subprocess.h',
+  'subprocess/ide-breakout-subprocess-private.h',
+  'subprocess/ide-simple-subprocess.c',
+  'subprocess/ide-simple-subprocess.h',
+  'theatrics/ide-box-theatric.c',
+  'theatrics/ide-box-theatric.h',
+  'theming/ide-css-provider.c',
+  'theming/ide-css-provider.h',
+  'theming/ide-theme-manager.c',
+  'theming/ide-theme-manager.h',
+  'tree/ide-tree-private.h',
+  'util/ide-async-helper.c',
+  'util/ide-async-helper.h',
+  'util/ide-battery-monitor.c',
+  'util/ide-battery-monitor.h',
+  'util/ide-doc-seq.c',
+  'util/ide-doc-seq.h',
+  'util/ide-gdk.c',
+  'util/ide-gdk.h',
+  'util/ide-ref-ptr.c',
+  'util/ide-ref-ptr.h',
+  'util/ide-window-settings.c',
+  'util/ide-window-settings.h',
+  'workbench/ide-layout-stack-actions.c',
+  'workbench/ide-layout-stack-actions.h',
+  'workbench/ide-layout-stack-private.h',
+  'workbench/ide-layout-tab-bar.c',
+  'workbench/ide-layout-tab-bar.h',
+  'workbench/ide-layout-tab-bar-private.h',
+  'workbench/ide-layout-tab.c',
+  'workbench/ide-layout-tab.h',
+  'workbench/ide-layout-tab-private.h',
+  'workbench/ide-omni-bar-row.c',
+  'workbench/ide-omni-bar-row.h',
+  'workbench/ide-perspective-menu-button.c',
+  'workbench/ide-perspective-menu-button.h',
+  'workbench/ide-workbench-actions.c',
+  'workbench/ide-workbench-private.h',
+  'workers/ide-worker-manager.c',
+  'workers/ide-worker-manager.h',
+  'workers/ide-worker-process.c',
+  'workers/ide-worker-process.h',
+  libide_resources,
+  libide_icons_resources,
+]
+
+libide_deps = [
+  dependency('gio-2.0 >= 2.49.0'),
+  dependency('gio-unix-2.0 >= 2.49.0'),
+  dependency('gtk+-3.0 >= 3.21.5'),
+  dependency('gtksourceview-3.0 >= 3.21.2'),
+  dependency('libpeas-1.0 >= 1.18.0'),
+  dependency('libxml-2.0 >= 2.9.0'),
+  dependency('pangoft2 >= 1.38.0'),
+]
+
+contrib_dir = meson.source_root() + '/contrib/'
+
+libide_includes = [
+  contrib_dir + 'egg',
+  contrib_dir + 'gd',
+  contrib_dir + 'nautilus',
+  contrib_dir + 'pnl',
+  contrib_dir + 'search',
+  contrib_dir + 'tmpl',
+  contrib_dir + 'xml',
+]
+
+libide_libs = [
+  libegg,
+  libgd,
+  libnautilus,
+  libpnl,
+  libsearch,
+  libtmpl,
+  libxml,
+]
+
+if get_option('with_webkit')
+  libide_sources += ['webkit/ide-webkit.c']
+  libide_deps += [dependency('webkit2gtk-4.0 >= 2.12.0')]
+endif
+
+libide_args = []
+if get_option('with_editorconfig')
+  libide_args += '-DENABLE_EDITORCONFIG'
+  libide_libs += libeditorconfig
+  libide_includes += [
+    contrib_dir + 'libeditorconfig',
+    meson.current_source_dir() + '/editorconfig',
+  ]
+  libide_sources += [
+    'editorconfig/editorconfig-glib.c',
+    'editorconfig/ide-editorconfig-file-settings.c',
+  ]
+endif
+
+libide = shared_library('ide', libide_sources,
+  dependencies: libide_deps,
+  include_directories: include_directories(libide_includes),
+  link_with: libide_libs,
+  c_args: libide_args,
+  install: true,
+  install_dir: get_option('libdir') + '/gnome-builder',
+)
diff --git a/libide/workers/ide-worker-manager.c b/libide/workers/ide-worker-manager.c
index e202d74..68deebd 100644
--- a/libide/workers/ide-worker-manager.c
+++ b/libide/workers/ide-worker-manager.c
@@ -18,6 +18,8 @@
 
 #define G_LOG_DOMAIN "ide-worker-manager"
 
+#include "config.h"
+
 #include <egg-counter.h>
 #include <gio/gio.h>
 #include <gio/gunixsocketaddress.h>
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..595af99
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,63 @@
+project('gnome-builder', 'c',
+  license: 'GPL3+',
+  version: '3.22.0',
+  # https://github.com/mesonbuild/meson/pull/834
+  default_options: ['b_lundef=false'],
+)
+
+conf = configuration_data()
+conf.set_quoted('PACKAGE_NAME', 'gnome-builder')
+conf.set_quoted('PACKAGE_VERSION', meson.project_version())
+conf.set_quoted('PACKAGE_STRING', 'gnome-builder-' + meson.project_version())
+conf.set_quoted('PACKAGE_DATADIR', get_option('datadir'))
+conf.set_quoted('PACKAGE_LIBDIR', get_option('datadir'))
+conf.set_quoted('PACKAGE_LOCALE_DIR', get_option('datadir') + '/locale')
+conf.set_quoted('PACKAGE_LIBEXECDIR', get_option('libexecdir'))
+
+conf.set('GETTEXT_PACKAGE', 'PACKAGE_NAME')
+conf.set('LOCALEDIR', 'PACKAGE_LOCALE_DIR')
+
+# We should probably avoid using these
+conf.set_quoted('SRCDIR', meson.source_root())
+conf.set_quoted('BUILDDIR', meson.build_root())
+
+add_global_arguments([
+  '-I' + meson.build_root(),
+  '-DHAVE_CONFIG_H',
+  '-D_GNU_SOURCE',
+  '-fPIC', '-fPIE', # Doesn't work?
+], language: 'c')
+
+add_global_link_arguments([
+  '-fpie', '-Wl,-z,relro', '-Wl,-z,now',
+], language: 'c')
+
+configure_file(
+  input: 'config.h.meson',
+  output: 'config.h',
+  configuration: conf
+)
+
+pkglibdir = get_option('libdir') + '/gnome-builder'
+gnome = import('gnome')
+
+subdir('contrib/egg')
+subdir('contrib/gd')
+subdir('contrib/gstyle')
+subdir('contrib/libeditorconfig')
+subdir('contrib/nautilus')
+subdir('contrib/pnl')
+subdir('contrib/rg')
+subdir('contrib/search')
+subdir('contrib/tmpl')
+subdir('contrib/xml')
+subdir('libide')
+
+executable('gnome-builder', 'src/main.c',
+  gui_app: true,
+  link_with: libide,
+  install: true,
+  include_directories: include_directories([
+    'libide'] + libide_includes),
+  dependencies: libide_deps,
+)
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..b0704b5
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,8 @@
+# Ideally we want many of these to be defined in the plugin dir:
+#   https://github.com/mesonbuild/meson/issues/707
+
+option('enable_tracing', type: 'boolean', value: false)
+option('enable_profiling', type: 'boolean', value: false)
+
+option('with_editorconfig', type: 'boolean')
+option('with_webkit', type: 'boolean')


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