[gupnp] meson: Respect bindir option



commit 9cabca33361bdba9e97f26437467eb041e5b7846
Author: Marvin Schmidt <marv exherbo org>
Date:   Mon Apr 11 19:51:42 2022 +0200

    meson: Respect bindir option
    
    Don't hardcode 'bin' (<prefix>/bin) but instead use the designated
    bindir option to get the install location for the binding tool

 meson.build       | 3 +++
 tools/meson.build | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 7a6e488..e4cc56b 100644
--- a/meson.build
+++ b/meson.build
@@ -10,6 +10,9 @@ api_config = configuration_data()
 api_config.set('GUPNP_API_VERSION', GUPNP_API_VERSION)
 api_config.set('GUPNP_API_NAME', GUPNP_API_NAME)
 
+prefix = get_option('prefix')
+bindir = join_paths(prefix, get_option('bindir'))
+
 netlink_available = cc.has_header('linux/rtnetlink.h')
 ifaddrs_available = cc.has_header('ifaddrs.h')
 
diff --git a/tools/meson.build b/tools/meson.build
index aea7142..c377140 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -3,5 +3,5 @@ configure_file(
   input: 'gupnp-binding-tool',
   output: 'gupnp-binding-tool-@0@'.format(GUPNP_API_VERSION),
   install: true,
-  install_dir: 'bin'
+  install_dir: bindir
 )


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