include: Install headers in an isolated include-dir

This commit is contained in:
Björn Esser 2017-12-27 15:56:07 +01:00
parent ff13849624
commit 892f7a5db0
No known key found for this signature in database
GPG Key ID: F52E98007594C21D
2 changed files with 15 additions and 7 deletions

View File

@ -1 +1,2 @@
configure_file(output: 'config.h', install_dir: 'include/wlr', configuration: conf_data)
header_install_dir = 'include/@0@/wlr'.format(meson.project_name())
configure_file(output: 'config.h', install_dir: header_install_dir, configuration: conf_data)

View File

@ -1,6 +1,7 @@
project(
'wlroots',
'c',
version: '0.0.1',
license: 'MIT',
meson_version: '>=0.43.0',
default_options: [
@ -80,16 +81,21 @@ if elogind.found() and get_option('enable_elogind')
conf_data.set('WLR_HAS_ELOGIND', true)
endif
exclude_files = []
exclude_headers = []
wlr_parts = []
if get_option('enable_xwayland')
subdir('xwayland')
wlr_parts += [lib_wlr_xwayland]
conf_data.set('WLR_HAS_XWAYLAND', true)
exclude_headers += 'xwayland.h'
exclude_headers += 'xwm.h'
else
exclude_files += ['xwayland.h', 'xwm.h']
exclude_headers += 'xwayland.h'
exclude_headers += 'xwm.h'
endif
install_subdir('include/wlr', install_dir: 'include', exclude_files: exclude_files)
exclude_headers += 'meson.build'
header_install_dir = 'include/@0@'.format(meson.project_name())
install_subdir('include/wlr', install_dir: header_install_dir, exclude_files: exclude_headers)
subdir('include')
@ -150,8 +156,9 @@ subdir('examples')
pkgconfig = import('pkgconfig')
pkgconfig.generate(
libraries: lib_wlr,
version: '0.0.1',
filebase: 'wlroots',
name: 'wlroots',
subdirs: '@0@'.format(meson.project_name()),
version: meson.project_version(),
filebase: meson.project_name(),
name: meson.project_name(),
description: 'Wayland compositor library',
)