[gnome-calculator] Add libpath option to add libraries searchpath



commit a29506a131d5b6a2a9bbf3b046b8e8676ee09d5e
Author: Daniel Espinosa <esodan gmail com>
Date:   Sat Oct 9 23:10:35 2021 -0500

    Add libpath option to add libraries searchpath
    
    Useful when no standard path is used to locate
    libraries

 meson.build       | 8 ++++++--
 meson_options.txt | 1 +
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 588b2551..cc12f22d 100644
--- a/meson.build
+++ b/meson.build
@@ -32,15 +32,19 @@ cc = meson.get_compiler('c')
 valac = meson.get_compiler('vala')
 
 libmath = cc.find_library('m')
+searchpath = []
+if get_option('libpath') != ''
+searchpath += [get_option('libpath')]
+endif
 mpc = declare_dependency(
   dependencies: [
-    cc.find_library('mpc'),
+    cc.find_library('mpc', dirs: searchpath),
     valac.find_library('mpc', dirs: gcalc_vapi_dir)
   ]
 )
 mpfr = declare_dependency(
   dependencies: [
-    cc.find_library('mpfr'),
+    cc.find_library('mpfr', dirs: searchpath),
     valac.find_library('mpfr', dirs: gcalc_vapi_dir)
   ]
 )
diff --git a/meson_options.txt b/meson_options.txt
index a5756f7b..5b239427 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,3 +2,4 @@ option('disable-ui', type : 'boolean', value : false, description : 'Disable GTK
 option('vala-version', type: 'string', value : '', description : 'Use another version of Vala (only the 
latest is officially supported)')
 option('disable-introspection', type : 'boolean', value : false, description : 'Disable GObject 
Introspection Typelib generation')
 option('ui-tests', type : 'boolean', value : false, description : 'Execute UI tests: requires 
X/Wayland/Broadway/Windows server')
+option('libpath', type: 'string', value : '', description : 'Used to add search path for libraries like mpc')


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