summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-04-07 13:58:13 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-04-07 13:58:13 -0700
commitb297a7738a02b3fb7a8842e054c4068195038c38 (patch)
tree846903789c9dff94110bd724c3e98025dc56ec5e /meson.build
parent2b5316265c5ce6c7dbd8f726826d5d5a7385febd (diff)
meson: Add a meson build system
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/app/appres/-/merge_requests/4>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build40
1 files changed, 40 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..9d27cb9
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,40 @@
+project('appres', 'c',
+ version : '1.0.6',
+ license : 'MIT',
+ default_options: ['warning_level=3'],
+)
+
+cc = meson.get_compiler('c')
+
+prefix = get_option('prefix')
+
+package_string = '@0@ @1@'.format(meson.project_name(), meson.project_version())
+
+conf_data = configuration_data()
+conf_data.set('PACKAGE_STRING', '"@0@"'.format(package_string))
+configure_file(output : 'config.h', configuration : conf_data)
+add_global_arguments('-DHAVE_CONFIG_H', language : 'c')
+
+x11_dep = dependency('x11', required: true)
+xmuu_dep = dependency('xt', required: true)
+xproto_dep = dependency('xproto', required: true, version: '>= 7.0.17')
+
+sources = ['appres.c']
+executable('appres', sources,
+ dependencies: [x11_dep, xmuu_dep, xproto_dep],
+ install: true)
+
+man = join_paths(prefix, get_option('mandir'))
+
+man_conf = configuration_data()
+man_conf.set('PACKAGE_STRING', package_string)
+man_conf.set('APP_MAN_SUFFIX', '1')
+man_conf.set('MISC_MAN_SUFFIX', '7')
+man_conf.set('XORG_MAN_PAGE', 'X Version 11')
+
+install_man(configure_file(
+ input: 'man/appres.man',
+ output: 'appres.1',
+ install_dir: join_paths(man, 'man1'),
+ configuration: man_conf
+))