[libgit2-glib/wip/inigomartinez/meson: 1/12] meson: Rename the package includedir



commit 0b7c62e1137dae1d69e60179ebf488c1c8937ce9
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Fri Jan 19 10:37:52 2018 +0100

    meson: Rename the package includedir
    
    The `includedir` used for the headers of the package itself has been
    usually named `pkgincludedir`.
    
    This patch creates a new variable to hold the name along the api
    version and uses this to create a new `pkgincludedir` variable
    which is going to be used instead of the `real includedir`.
    
    The subdir parameter of install headers has also been changed to
    use the path relative to the system header directory instead of
    the absolute path.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=792699

 libgit2-glib/meson.build |    6 +++---
 meson.build              |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/libgit2-glib/meson.build b/libgit2-glib/meson.build
index d399eb1..8204a4a 100644
--- a/libgit2-glib/meson.build
+++ b/libgit2-glib/meson.build
@@ -157,16 +157,16 @@ endif
 configure_file(input : 'ggit.h.in',
                output : 'ggit.h',
                configuration : ggit_h_data,
-               install_dir: libgit2_glib_includedir_real)
+               install_dir: libgit2_glib_pkgincludedir)
 
 enum_types = gnome.mkenums('ggit-enum-types',
   sources : headers,
   h_template : 'ggit-enum-types.h.template',
   c_template : 'ggit-enum-types.c.template',
   install_header : true,
-  install_dir: libgit2_glib_includedir_real)
+  install_dir: libgit2_glib_pkgincludedir)
 
-install_headers(headers, subdir: libgit2_glib_includedir_real)
+install_headers(headers, subdir: join_paths(libgit2_glib_api_name, meson.project_name()))
 
 pkgconfig_files = [ 'libgit2-glib-@0@'.format(libgit2_glib_api_version) ]
 platform_deps = [ glib, gobject, gio, libgit2 ]
diff --git a/meson.build b/meson.build
index 4ceefc6..c7440c4 100644
--- a/meson.build
+++ b/meson.build
@@ -13,6 +13,7 @@ libgit2_glib_minor_version = version_array[1].to_int()
 libgit2_glib_micro_version = version_array[2].to_int()
 
 libgit2_glib_api_version = '1.0'
+libgit2_glib_api_name = '@0@-@1@'.format(meson.project_name(), libgit2_glib_api_version)
 
 # The interface age is reset every time we add new API; this
 # should only happen during development cycles, otherwise the
@@ -34,11 +35,10 @@ libversion = '@0@.@1@.@2@'.format(soversion, current, revision)
 libgit2_glib_prefix = get_option('prefix')
 libgit2_glib_libdir = join_paths(libgit2_glib_prefix, get_option('libdir'))
 libgit2_glib_includedir = join_paths(libgit2_glib_prefix, get_option('includedir'))
-libgit2_glib_includedir_real = join_paths(libgit2_glib_includedir,
-                                          'libgit2-glib-@0@'.format(libgit2_glib_api_version),
-                                          'libgit2-glib')
 libgit2_glib_datadir = join_paths(libgit2_glib_prefix, get_option('datadir'))
 
+libgit2_glib_pkgincludedir = join_paths(libgit2_glib_includedir, libgit2_glib_api_name, meson.project_name())
+
 cc = meson.get_compiler('c')
 host_system = host_machine.system()
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]