summaryrefslogtreecommitdiff
path: root/src/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'src/meson.build')
-rw-r--r--src/meson.build108
1 files changed, 108 insertions, 0 deletions
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..40f2466
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,108 @@
+croco_headers = [
+ 'libcroco.h',
+ 'cr-additional-sel.h',
+ 'cr-attr-sel.h',
+ 'cr-cascade.h',
+ 'cr-declaration.h',
+ 'cr-doc-handler.h',
+ 'cr-enc-handler.h',
+ 'cr-input.h',
+ 'cr-num.h',
+ 'cr-om-parser.h',
+ 'cr-parser.h',
+ 'cr-pseudo.h',
+ 'cr-rgb.h',
+ 'cr-selector.h',
+ 'cr-simple-sel.h',
+ 'cr-statement.h',
+ 'cr-stylesheet.h',
+ 'cr-term.h',
+ 'cr-tknzr.h',
+ 'cr-token.h',
+ 'cr-utils.h',
+ 'cr-fonts.h',
+ 'cr-sel-eng.h',
+ 'cr-style.h',
+ 'cr-prop-list.h',
+ 'cr-parsing-location.h',
+ 'cr-string.h',
+]
+inc_subdir = join_paths('libcroco-' + croco_api_version, 'libcroco')
+install_headers(croco_headers, subdir: inc_subdir)
+
+crocodata = configuration_data()
+croco_vernum = 10000 * croco_versions[0].to_int() + 100 * croco_versions[1].to_int() + croco_versions[2].to_int()
+crocodata.set('LIBCROCO_VERSION_NUMBER', croco_vernum)
+crocodata.set('LIBCROCO_VERSION', croco_version)
+crocodata.set('G_DISABLE_CHECKS', 0)
+configure_file(input: 'libcroco-config.h.in',
+ output: 'libcroco-config.h',
+ configuration: crocodata,
+ install_dir: join_paths(get_option('includedir'), inc_subdir))
+
+croco_sources = [
+ 'cr-utils.c',
+ 'cr-utils.h',
+ 'cr-input.c',
+ 'cr-input.h',
+ 'cr-enc-handler.c',
+ 'cr-enc-handler.h',
+ 'cr-num.c',
+ 'cr-num.h',
+ 'cr-rgb.c',
+ 'cr-rgb.h',
+ 'cr-token.c',
+ 'cr-token.h',
+ 'cr-tknzr.c',
+ 'cr-tknzr.h',
+ 'cr-term.c',
+ 'cr-term.h',
+ 'cr-attr-sel.c',
+ 'cr-attr-sel.h',
+ 'cr-pseudo.c',
+ 'cr-pseudo.h',
+ 'cr-additional-sel.c',
+ 'cr-additional-sel.h',
+ 'cr-simple-sel.c',
+ 'cr-simple-sel.h',
+ 'cr-selector.c',
+ 'cr-selector.h',
+ 'cr-doc-handler.c',
+ 'cr-doc-handler.h',
+ 'cr-parser.c',
+ 'cr-parser.h',
+ 'cr-declaration.c',
+ 'cr-declaration.h',
+ 'cr-statement.c',
+ 'cr-statement.h',
+ 'cr-stylesheet.c',
+ 'cr-stylesheet.h',
+ 'cr-cascade.c',
+ 'cr-cascade.h',
+ 'cr-om-parser.c',
+ 'cr-om-parser.h',
+ 'cr-style.c',
+ 'cr-style.h',
+ 'cr-sel-eng.c',
+ 'cr-sel-eng.h',
+ 'cr-fonts.c',
+ 'cr-fonts.h',
+ 'cr-prop-list.c',
+ 'cr-prop-list.h',
+ 'cr-parsing-location.c',
+ 'cr-parsing-location.h',
+ 'cr-string.c',
+ 'cr-string.h',
+]
+
+libcroco = library('croco-' + croco_api_version, croco_sources,
+ version: croco_ltversion,
+ darwin_versions: croco_osxversions,
+ dependencies: [glib_dep, libxml2_dep],
+ vs_module_defs: 'libcroco.def',
+ install: true)
+
+libcroco_inc = include_directories('.')
+libcroco_dep = declare_dependency(link_with: libcroco,
+ include_directories: libcroco_inc,
+ dependencies: [glib_dep, libxml2_dep])