diff options
author | Mathieu Duponchelle <mathieu@centricular.com> | 2018-05-21 20:08:22 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2020-07-31 12:21:50 +0100 |
commit | 596a82f2d185b101bd74645492821fe2f9e0daa0 (patch) | |
tree | 3a595c888df37054bebb989455e73ea3683c6477 /util/meson.build | |
parent | a75f8df95761bf88b54c326c5312117ea5073010 (diff) | |
download | cairo-596a82f2d185b101bd74645492821fe2f9e0daa0.tar.gz |
Add meson build definitions
Co-Authored by:
Nirbheek Chauhan <nirbheek@centricular.com>
lb90 <luca.bacci982@gmail.com>
Tim-Philipp Müller <tim@centricular.com>
Diffstat (limited to 'util/meson.build')
-rw-r--r-- | util/meson.build | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/util/meson.build b/util/meson.build new file mode 100644 index 000000000..3f16d7c78 --- /dev/null +++ b/util/meson.build @@ -0,0 +1,66 @@ +subdir('cairo-missing') + +cairo_utils = [] + +if feature_conf.get('CAIRO_HAS_GOBJECT_FUNCTIONS', 0) == 1 + subdir('cairo-gobject') +endif + +if feature_conf.get('CAIRO_HAS_INTERPRETER', 0) == 1 + subdir('cairo-script') +endif + +if conf.get('CAIRO_HAS_TRACE', 0) == 1 + subdir('cairo-trace') + + if (conf.get('CAIRO_HAS_DLSYM', 0) == 1 and + feature_conf.get('CAIRO_HAS_SCRIPT_SURFACE', 0) == 1 and + feature_conf.get('CAIRO_HAS_TEE_SURFACE', 0) == 1) + subdir('cairo-fdr') + endif +endif + +if (glib_dep.found() and + png_dep.found() and + host_machine.system() != 'windows' and + conf.get('CAIRO_HAS_DLSYM', 0) == 1 and + feature_conf.get('CAIRO_HAS_SCRIPT_SURFACE', 0) == 1 and + feature_conf.get('CAIRO_HAS_TEE_SURFACE', 0) == 1) + subdir('cairo-sphinx') +endif + +if gtk_dep.found() + cairo_utils += [ + ['show-contour.c', {'deps': [gtk_dep]}], + ['show-traps.c', {'deps': [gtk_dep]}], + ['show-edges.c', {'deps': [gtk_dep]}], + ['show-polygon.c', {'deps': [gtk_dep]}], + ['show-events.c', {'deps': [gtk_dep]}], + ['font-view.c', {'deps': [gtk_dep]}], + ] +endif + +if feature_conf.get('CAIRO_HAS_INTERPRETER', 0) == 1 + expat_dep = dependency('expat', fallback: ['expat', 'expat_dep']) + cairo_utils += [ + ['trace-to-xml.c', {'deps': [expat_dep]}], + ['xml-to-trace.c', {'deps': [expat_dep]}], + ] +endif + +foreach util : cairo_utils + exe_name = util[0].split('.')[0] + util_deps = util.get(1, {}).get('deps', []) + executable(exe_name, util[0], + include_directories: [incbase, incsrc, inccairoscript], + dependencies: deps + util_deps, + link_with: [libcairo, libcairoscript], + ) +endforeach + +# This is useless and doesn't build on Windows +if host_machine.system() != 'windows' + libmallocstats = library('malloc-stats', 'malloc-stats.c') +endif + +# backtrace-symbols does not build |