From 892f7a5db022ffec5cb6fe363d9a929e475c22d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Wed, 27 Dec 2017 15:56:07 +0100 Subject: [PATCH] include: Install headers in an isolated include-dir --- include/wlr/meson.build | 3 ++- meson.build | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/include/wlr/meson.build b/include/wlr/meson.build index 508abfe7..eb0248d7 100644 --- a/include/wlr/meson.build +++ b/include/wlr/meson.build @@ -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) diff --git a/meson.build b/meson.build index 21e6e381..7d4997ad 100644 --- a/meson.build +++ b/meson.build @@ -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', )