diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-11-04 15:40:40 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-11-08 11:49:50 -0800 |
commit | c0888158e30bfcd0ae6881b9d78c8122ce2d5f4e (patch) | |
tree | ea790d63960d82b68ae3013c074d007fd78b9907 /meson.build | |
parent | 752d9cbc0efc51bdef2ea25fba2b92974327f6a6 (diff) |
Add a meson build system
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 31 |
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') |