summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe CorrĂȘa da Silva Sanches <juca@members.fsf.org>2018-03-15 21:32:18 +0000
committerFelipe CorrĂȘa da Silva Sanches <juca@members.fsf.org>2018-03-17 20:54:37 +0000
commitfd882b622be1da7d44679e235da6cedbc994b623 (patch)
treecfb44e34ec9fe8ff3e33b002793053e6f2ef24f5
parentmake jemalloc optional at compile time (diff)
downloadinkscape-fd882b622be1da7d44679e235da6cedbc994b623.tar.gz
inkscape-fd882b622be1da7d44679e235da6cedbc994b623.zip
wip - meson build system
-rw-r--r--config.h.meson265
-rw-r--r--meson.build48
-rw-r--r--src/libnrtype/meson.build40
-rw-r--r--src/meson.build1
4 files changed, 354 insertions, 0 deletions
diff --git a/config.h.meson b/config.h.meson
new file mode 100644
index 000000000..a5734e815
--- /dev/null
+++ b/config.h.meson
@@ -0,0 +1,265 @@
+#ifndef _CONFIG_H_
+#define _CONFIG_H_
+
+/* Define WIN32 when on windows */
+#ifndef WIN32
+#mesondefine WIN32
+#endif
+
+/* Use binreloc thread support? */
+#mesondefine BR_PTHREADS
+
+/* Use AutoPackage? */
+#mesondefine ENABLE_BINRELOC
+
+/* define to 1 if you have lcms version 1.x */
+#mesondefine HAVE_LIBLCMS1
+
+/* define to 1 if you have lcms version 2.x */
+#mesondefine HAVE_LIBLCMS2
+
+/* always defined to indicate that i18n is enabled */
+#mesondefine ENABLE_NLS
+
+/* Build with OSX .app data dir paths? */
+#mesondefine ENABLE_OSX_APP_LOCATIONS
+
+/* Translation domain used */
+#define GETTEXT_PACKAGE "${PROJECT_NAME}"
+
+/* Define to 1 if you have the `bind_textdomain_codeset' function. */
+#mesondefine HAVE_BIND_TEXTDOMAIN_CODESET
+
+/* Whether the Cairo PDF backend is available */
+#mesondefine HAVE_CAIRO_PDF
+#mesondefine PANGO_ENABLE_ENGINE
+#mesondefine RENDER_WITH_PANGO_CAIRO
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#mesondefine HAVE_FCNTL_H
+
+/* Define to 1 if you have the `floor' function. */
+#mesondefine HAVE_FLOOR
+
+/* Define to 1 if you have the `fpsetmask' function. */
+#mesondefine HAVE_FPSETMASK
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#mesondefine HAVE_GETTIMEOFDAY
+
+/* Build with Gtkmm 3.0.x or higher */
+#mesondefine WITH_GTKMM_3_0
+
+/* Build with Gtkmm 3.10.x or higher */
+#mesondefine WITH_GTKMM_3_10
+
+/* Build with Gtkmm 3.12.x or higher */
+#mesondefine WITH_GTKMM_3_12
+
+/* Build with Gtkmm 3.16.x or higher */
+#mesondefine WITH_GTKMM_3_16
+
+/* Build with Gtkmm 3.22.x or higher */
+#mesondefine WITH_GTKMM_3_22
+
+/* Build with GDL 3.6 or higher */
+#mesondefine WITH_GDL_3_6
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+#mesondefine HAVE_IEEEFP_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#mesondefine HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `mallinfo' function. */
+#mesondefine HAVE_MALLINFO
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#mesondefine HAVE_MALLOC_H
+
+/* Define to 1 if you have the `memmove' function. */
+#mesondefine HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#mesondefine HAVE_MEMORY_H
+
+/* Define to 1 if you have the `memset' function. */
+#mesondefine HAVE_MEMSET
+
+/* Use OpenMP (via meson) */
+#mesondefine HAVE_OPENMP
+
+/* Use aspell for built-in spellchecker */
+#mesondefine HAVE_ASPELL
+
+/* Use libpoppler for direct PDF import */
+#mesondefine HAVE_POPPLER
+
+/* Use libpoppler-cairo for rendering PDF preview */
+#mesondefine HAVE_POPPLER_CAIRO
+
+/* Use libpoppler-glib and Cairo-SVG for PDF import */
+#mesondefine HAVE_POPPLER_GLIB
+
+/* Use color space API from Poppler >= 0.26.0 */
+#mesondefine POPPLER_EVEN_NEWER_COLOR_SPACE_API
+
+/* Use color space API from Poppler >= 0.29.0 */
+#mesondefine POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API
+
+/* Use object API from Poppler >= 0.58.0 */
+#mesondefine POPPLER_NEW_OBJECT_API
+
+/* Define to 1 if you have the `pow' function. */
+#mesondefine HAVE_POW
+
+/* Define to 1 if you have the `sqrt' function. */
+#mesondefine HAVE_SQRT
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#mesondefine HAVE_STDINT_H
+
+/* Define to 1 if you have the `strpbrk' function. */
+#mesondefine HAVE_STRPBRK
+
+/* Define to 1 if you have the `strrchr' function. */
+#mesondefine HAVE_STRRCHR
+
+/* Define to 1 if you have the `strspn' function. */
+#mesondefine HAVE_STRSPN
+
+/* Define to 1 if you have the `strstr' function. */
+#mesondefine HAVE_STRSTR
+
+/* Define to 1 if you have the `strtoul' function. */
+#mesondefine HAVE_STRTOUL
+
+/* Define to 1 if `fordblks' is member of `struct mallinfo'. */
+#mesondefine HAVE_STRUCT_MALLINFO_FORDBLKS
+
+/* Define to 1 if `fsmblks' is member of `struct mallinfo'. */
+#mesondefine HAVE_STRUCT_MALLINFO_FSMBLKS
+
+/* Define to 1 if `hblkhd' is member of `struct mallinfo'. */
+#mesondefine HAVE_STRUCT_MALLINFO_HBLKHD
+
+/* Define to 1 if `uordblks' is member of `struct mallinfo'. */
+#mesondefine HAVE_STRUCT_MALLINFO_UORDBLKS
+
+/* Define to 1 if `usmblks' is member of `struct mallinfo'. */
+#mesondefine HAVE_STRUCT_MALLINFO_USMBLKS
+
+/* 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/time.h> header file. */
+#mesondefine HAVE_SYS_TIME_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
+
+/* Base data directory -- only path-prefix.h should use it! */
+#define INKSCAPE_DATADIR "${INKSCAPE_DATADIR}"
+
+/* Base library directory -- only path-prefix.h should use it! */
+#define INKSCAPE_LIBDIR "${INKSCAPE_LIBDIR}"
+
+/* Name of package */
+#define PACKAGE "${PROJECT_NAME}"
+
+/* Localization directory */
+#define PACKAGE_LOCALE_DIR "${PACKAGE_LOCALE_DIR}"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "${PROJECT_NAME}"
+
+/* Build in dbus */
+#mesondefine WITH_DBUS
+
+/* enable gtk spelling widget */
+#mesondefine WITH_GTKSPELL
+
+/* Image Magick++ support for bitmap effects */
+#mesondefine WITH_IMAGE_MAGICK
+
+/* Use libjpeg */
+#mesondefine HAVE_JPEG
+
+/* Build in libcdr */
+#mesondefine WITH_LIBCDR
+
+/* Build using libcdr 0.0.x */
+#mesondefine WITH_LIBCDR00
+
+/* Build using libcdr 0.1.x */
+#mesondefine WITH_LIBCDR01
+
+/* Build in libvisio */
+#mesondefine WITH_LIBVISIO
+
+/* Build using libvisio 0.0.x */
+#mesondefine WITH_LIBVISIO00
+
+/* Build using libvisio 0.1.x */
+#mesondefine WITH_LIBVISIO01
+
+/* Build in libwpg */
+#mesondefine WITH_LIBWPG
+
+/* Build in libwpg-0.1 */
+#mesondefine WITH_LIBWPG01
+
+/* Build in libwpg-0.2 */
+#mesondefine WITH_LIBWPG02
+
+/* Build in libwpg-0.3 */
+#mesondefine WITH_LIBWPG03
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#mesondefine WORDS_BIGENDIAN
+
+/* Do we want experimental, unsupported, unguaranteed, etc., LivePathEffects enabled? */
+#mesondefine LPE_ENABLE_TEST_EFFECTS
+
+/* Local variables to store GTKMM version */
+/*
+#define INKSCAPE_GTKMM_MAJOR_VERSION @INKSCAPE_GTKMM_MAJOR_VERSION@
+#define INKSCAPE_GTKMM_MINOR_VERSION @INKSCAPE_GTKMM_MINOR_VERSION@
+#define INKSCAPE_GTKMM_MICRO_VERSION @INKSCAPE_GTKMM_MICRO_VERSION@
+*/
+
+/**
+ * Check GtkMM version
+ *
+ * This is adapted from the upstream Gtk+ macro for use with GtkMM
+ *
+ * @todo Perhaps this should be in its own header? However, this is likely to
+ * be used very frequently, so It would be annoying to have to add another
+ * header inclusion in many files
+ *
+ *
+ * @major: major version (e.g. 1 for version 1.2.5)
+ * @minor: minor version (e.g. 2 for version 1.2.5)
+ * @micro: micro version (e.g. 5 for version 1.2.5)
+ *
+ * Returns %TRUE if the version of the GTK+ header files
+ * is the same as or newer than the passed-in version.
+ *
+ * Returns: %TRUE if GTK+ headers are new enough
+ */
+
+/*
+#define GTKMM_CHECK_VERSION(major,minor,micro) \
+ (INKSCAPE_GTKMM_MAJOR_VERSION > (major) || \
+ (INKSCAPE_GTKMM_MAJOR_VERSION == (major) && INKSCAPE_GTKMM_MINOR_VERSION > (minor)) || \
+ (INKSCAPE_GTKMM_MAJOR_VERSION == (major) && INKSCAPE_GTKMM_MINOR_VERSION == (minor) && \
+ INKSCAPE_GTKMM_MICRO_VERSION >= (micro)))
+*/
+
+#endif /* _CONFIG_H_ */
+
+
diff --git a/meson.build b/meson.build
new file mode 100644
index 000000000..13c67b068
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,48 @@
+project('inkscape', 'cpp',
+ version: '0.92+devel',
+ default_options: [
+ 'buildtype=debugoptimized',
+ 'warning_level=1',
+ 'c_std=c99',
+ ],
+ meson_version : '>= 0.43.0',
+ license: 'GPLv3+')
+
+pango_req = '>= 1.41.0'
+cairo_req = '>= 1.14.0'
+glib_req = '>= 2.36.0'
+gtkmm_req = '>= 3.16.0'
+xml2_req = '>= 2.7.4'
+
+# Dependencies
+cairo_dep = dependency('cairo', version: cairo_req, required : true)
+xml2_dep = dependency('libxml-2.0', version: xml2_req, required : true)
+glib_dep = dependency('glib-2.0', version: glib_req, required : true)
+gtkmm_dep = dependency('gtkmm-3.0', version: gtkmm_req, required : true)
+pango_dep = dependency('pango', version: pango_req,
+ fallback : ['pango', 'libpango_dep'])
+pangocairo_dep = dependency('pangocairo', version: cairo_req,
+ fallback : ['pango', 'libpangocairo_dep'])
+harfbuzz_dep = dependency('harfbuzz', version: '>= 0.9', required: false)
+
+common_cflags = ''
+common_ldflags = ''
+
+confinc = include_directories('.')
+srcinc = include_directories('src')
+
+subdir('src')
+
+#if get_option('build-tests')
+# subdir('tests')
+#endif
+
+cdata = configuration_data()
+cdata.set('HAVE_HARFBUZZ', harfbuzz_dep.found())
+#cdata.set('HAVE_PANGOFT', pangoft_dep.found())
+
+# config.h
+configure_file(input: 'config.h.meson',
+ output: 'config.h',
+ configuration: cdata)
+
diff --git a/src/libnrtype/meson.build b/src/libnrtype/meson.build
new file mode 100644
index 000000000..f76b87596
--- /dev/null
+++ b/src/libnrtype/meson.build
@@ -0,0 +1,40 @@
+layout_tng_sources = files([
+ 'Layout-TNG-Compute.cpp',
+ 'Layout-TNG-Output.cpp',
+ 'FontFactory.cpp',
+ 'Layout-TNG.cpp',
+ 'font-lister.cpp',
+ 'Layout-TNG-Scanline-Makers.cpp',
+ 'Layout-TNG-Input.cpp',
+ 'FontInstance.cpp',
+ 'Layout-TNG-OutIter.cpp'
+])
+
+layout_tng_headers = files([
+ 'font-instance.h',
+ 'Layout-TNG-Scanline-Maker.h',
+ 'FontFactory.h',
+ 'Layout-TNG.h',
+ 'font-glyph.h',
+ 'font-lister.h',
+ 'font-style.h'
+])
+
+#install_headers(layout_tng_headers)
+
+layout_tng_deps = [
+ glib_dep,
+ gtkmm_dep,
+ xml2_dep
+]
+
+layout_tng_inc = include_directories('.')
+
+libnrtype = static_library('nrtype',
+ sources: [layout_tng_sources,
+ layout_tng_headers],
+ dependencies: layout_tng_deps,
+ include_directories: [srcinc, confinc, layout_tng_inc],
+ c_args: common_cflags,
+ link_args: common_ldflags)
+
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 000000000..9bba6af40
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1 @@
+subdir('libnrtype')