summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2018-03-26 18:43:00 -0400
committerAdam Jackson <ajax@redhat.com>2018-03-27 10:28:33 -0400
commit8c684f59d517db0812fbad5fc6bcd90c7c810493 (patch)
treeee0627a7a170b312667b4ba0a4e00a8c07d77909 /meson.build
parent9b67303a52f5380bc96862624778b101f6379527 (diff)
meson: Generate xorg-server.pc
Otherwise external drivers can't build against us. Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build54
1 files changed, 54 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index cd4f6fc63..49014719b 100644
--- a/meson.build
+++ b/meson.build
@@ -564,3 +564,57 @@ install_man(configure_file(
output: 'Xserver.1',
configuration: manpage_config,
))
+
+if build_xorg
+ sdkconfig = configuration_data()
+ awk = find_program('awk')
+
+ sdkconfig.set('prefix', get_option('prefix'))
+ sdkconfig.set('exec_prefix', get_option('prefix'))
+ sdkconfig.set('libdir', get_option('libdir'))
+ sdkconfig.set('includedir', get_option('includedir'))
+ sdkconfig.set('datarootdir', get_option('datadir'))
+ sdkconfig.set('moduledir', get_option('module_dir'))
+ sdkconfig.set('sdkdir', join_paths(get_option('includedir'), 'include'))
+ sdkconfig.set('sysconfigdir', join_paths(get_option('datadir'), 'X11/xorg.conf.d'))
+
+ sdkconfig.set('abi_ansic',
+ run_command(awk, '-F', '[(,)]',
+ '/^#define ABI_ANSIC.*SET/ { printf "%d.%d\n", $2, $3 }',
+ files('hw/xfree86/common/xf86Module.h')
+ ).stdout()
+ )
+ sdkconfig.set('abi_videodrv',
+ run_command(awk, '-F', '[(,)]',
+ '/^#define ABI_VIDEODRV.*SET/ { printf "%d.%d\n", $2, $3 }',
+ files('hw/xfree86/common/xf86Module.h')
+ ).stdout()
+ )
+ sdkconfig.set('abi_xinput',
+ run_command(awk, '-F', '[(,)]',
+ '/^#define ABI_XINPUT.*SET/ { printf "%d.%d\n", $2, $3 }',
+ files('hw/xfree86/common/xf86Module.h')
+ ).stdout()
+ )
+ sdkconfig.set('abi_extension',
+ run_command(awk, '-F', '[(,)]',
+ '/^#define ABI_EXTENSION.*SET/ { printf "%d.%d\n", $2, $3 }',
+ files('hw/xfree86/common/xf86Module.h')
+ ).stdout()
+ )
+
+ # XXX this isn't trying very hard, but hard enough.
+ sdkconfig.set('PACKAGE_VERSION', meson.project_version())
+ sdkconfig.set('SDK_REQUIRED_MODULES', '')
+ sdkconfig.set('symbol_visibility', '-fvisibility=hidden')
+ sdkconfig.set('XORG_DRIVER_LIBS', '')
+
+ configure_file(
+ input: 'xorg-server.pc.in',
+ output: 'xorg-server.pc',
+ configuration: sdkconfig,
+ install_dir: join_paths(get_option('prefix'),
+ get_option('libdir'),
+ 'pkgconfig'),
+ )
+endif