diff options
| author | Felipe CorrĂȘa da Silva Sanches <juca@members.fsf.org> | 2018-03-16 01:00:26 +0000 |
|---|---|---|
| committer | Felipe CorrĂȘa da Silva Sanches <juca@members.fsf.org> | 2018-03-17 20:54:37 +0000 |
| commit | 8a0b89ac882477bc9049db24bff1bd793af7d689 (patch) | |
| tree | 20a98e6976c232b89a9ee0fba2fff45cf82ca299 | |
| parent | wip - meson build system (diff) | |
| download | inkscape-8a0b89ac882477bc9049db24bff1bd793af7d689.tar.gz inkscape-8a0b89ac882477bc9049db24bff1bd793af7d689.zip | |
[meson-build] building the ui
| -rw-r--r-- | config.h.meson | 19 | ||||
| -rw-r--r-- | meson.build | 40 | ||||
| -rw-r--r-- | src/libnrtype/meson.build | 6 | ||||
| -rw-r--r-- | src/meson.build | 1 |
4 files changed, 43 insertions, 23 deletions
diff --git a/config.h.meson b/config.h.meson index a5734e815..aa74332b0 100644 --- a/config.h.meson +++ b/config.h.meson @@ -25,7 +25,7 @@ #mesondefine ENABLE_OSX_APP_LOCATIONS /* Translation domain used */ -#define GETTEXT_PACKAGE "${PROJECT_NAME}" +#define GETTEXT_PACKAGE "@PROJECT_NAME@" /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #mesondefine HAVE_BIND_TEXTDOMAIN_CODESET @@ -162,19 +162,19 @@ #mesondefine HAVE_UNISTD_H /* Base data directory -- only path-prefix.h should use it! */ -#define INKSCAPE_DATADIR "${INKSCAPE_DATADIR}" +#define INKSCAPE_DATADIR "@INKSCAPE_DATADIR@" /* Base library directory -- only path-prefix.h should use it! */ -#define INKSCAPE_LIBDIR "${INKSCAPE_LIBDIR}" +#define INKSCAPE_LIBDIR "@INKSCAPE_LIBDIR@" /* Name of package */ -#define PACKAGE "${PROJECT_NAME}" +#define PACKAGE "@PROJECT_NAME@" /* Localization directory */ -#define PACKAGE_LOCALE_DIR "${PACKAGE_LOCALE_DIR}" +#define PACKAGE_LOCALE_DIR "@PACKAGE_LOCALE_DIR@" /* Define to the full name of this package. */ -#define PACKAGE_NAME "${PROJECT_NAME}" +#define PACKAGE_NAME "@PROJECT_NAME@" /* Build in dbus */ #mesondefine WITH_DBUS @@ -226,11 +226,9 @@ #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 @@ -251,15 +249,10 @@ * * 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 index 13c67b068..6fb0bca51 100644 --- a/meson.build +++ b/meson.build @@ -8,13 +8,15 @@ project('inkscape', 'cpp', 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' +gdl_req = '>= 3.6.0' +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 +gdl_dep = dependency('gdl-3.0', version: gdl_req, required : true) 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) @@ -27,6 +29,7 @@ harfbuzz_dep = dependency('harfbuzz', version: '>= 0.9', required: false) common_cflags = '' common_ldflags = '' +add_project_arguments('-DHAVE_CONFIG_H', language: 'cpp') confinc = include_directories('.') srcinc = include_directories('src') @@ -41,8 +44,35 @@ cdata = configuration_data() cdata.set('HAVE_HARFBUZZ', harfbuzz_dep.found()) #cdata.set('HAVE_PANGOFT', pangoft_dep.found()) +if gdl_dep.found() + cdata.set('WITH_GDL_3_6', 1) +endif + +gtkmm_version = gtkmm_dep.version() +cdata.set('INKSCAPE_GTKMM_MAJOR_VERSION', gtkmm_version.split('.')[0].to_int()) +cdata.set('INKSCAPE_GTKMM_MICRO_VERSION', gtkmm_version.split('.')[1].to_int()) +cdata.set('INKSCAPE_GTKMM_MINOR_VERSION', gtkmm_version.split('.')[2].to_int()) + +cdata.set('INKSCAPE_DATADIR', '/usr/local/share') #TODO: should this be INSTALL_DIR + '/share' ? + # config.h configure_file(input: 'config.h.meson', output: 'config.h', configuration: cdata) +inkscape_sources = [ + ui_sources, ui_headers +] + +inkscape_deps = [ + gtkmm_dep, + xml2_dep, + gdl_dep +] + +executable('inkscape', + sources: inkscape_sources, + dependencies : inkscape_deps, + include_directories: [srcinc, confinc] +) + diff --git a/src/libnrtype/meson.build b/src/libnrtype/meson.build index f76b87596..c440f4f0e 100644 --- a/src/libnrtype/meson.build +++ b/src/libnrtype/meson.build @@ -20,21 +20,17 @@ layout_tng_headers = files([ '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], + include_directories: [srcinc, confinc], c_args: common_cflags, link_args: common_ldflags) diff --git a/src/meson.build b/src/meson.build index 9bba6af40..cf871f1f5 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1 +1,2 @@ subdir('libnrtype') +subdir('ui') |
