[gcab/wip/hughsie/override_find_program] Register the gcab executable with meson




commit 9f24532c44f2a4cd442c67c5b9ae28669aac75eb
Author: Richard Hughes <richard hughsie com>
Date:   Mon May 9 14:05:45 2022 +0100

    Register the gcab executable with meson
    
    This allows any project building gcab as a subproject to use the built
    gcab binary rather than native one, just by using this snippet in the
    project `gcab.wrap` file:
    
        [provide]
        program_names = gcab

 src/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/meson.build b/src/meson.build
index 4149fbc..609d9bf 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -6,7 +6,7 @@ configure_file(
   install_dir : join_paths(get_option('mandir'), 'man1'),
 )
 
-executable(
+gcab = executable(
   'gcab',
   sources : [
     'gcab.c',
@@ -25,6 +25,7 @@ executable(
   install : true,
   install_dir : get_option('bindir')
 )
+meson.override_find_program('gcab', gcab)
 
 executable(
   'gcab-fuzz',


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