summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build31
1 files changed, 31 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..d5011dc
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,31 @@
+project('libxkbfile', 'c',
+ version: '1.1.2',
+ meson_version: '>= 0.57.0',
+ license: 'MIT'
+)
+
+cc = meson.get_compiler('c')
+
+cc_conf = configuration_data({
+ 'HAVE_STRCASECMP': cc.has_function('strcasecmp') ? '1' : false,
+ 'HAVE_STRNDUP': cc.has_function('strndup') and
+ cc.has_header_symbol('string.h', 'strndup') ? '1' : false,
+ 'HAVE_UNLOCKED_STDIO': cc.has_function('getc_unlocked') ? '1' : false
+})
+configure_file(output: 'config.h',
+ configuration: cc_conf)
+
+pc_conf = configuration_data({
+ 'prefix': get_option('prefix'),
+ 'exec_prefix': '${prefix}',
+ 'libdir': '${exec_prefix}' / get_option('libdir'),
+ 'includedir': '${prefix}' / get_option('includedir'),
+ 'PACKAGE_VERSION': meson.project_version()
+})
+configure_file(output: 'xkbfile.pc',
+ input: 'xkbfile.pc.in',
+ install: true,
+ install_dir: get_option('libdir') / 'pkgconfig',
+ configuration: pc_conf)
+
+subdir('src')