From 965ad0527935f37d99f5f3f28dd27328e6af1ef8 Mon Sep 17 00:00:00 2001 From: Ryan Volz Date: Tue, 29 Oct 2019 17:13:58 -0400 Subject: lib: utils: Don't use hard-coded path constants This replaces the package path constant with a runtime library path lookup. The package path is taken to be the parent directory of the library directory. When boost >= 1.61 is not available, this maintains the current behavior of using CMake to set path contants. Runtime path determination is preferable for making a relocatable library so that it is not necessary to do string substitution on relocated binaries (as with, for example, building a conda package). --- host/include/uhd/utils/paths.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'host/include') diff --git a/host/include/uhd/utils/paths.hpp b/host/include/uhd/utils/paths.hpp index 035a4943d..e5b451542 100644 --- a/host/include/uhd/utils/paths.hpp +++ b/host/include/uhd/utils/paths.hpp @@ -23,6 +23,9 @@ UHD_API std::string get_tmp_path(void); //! Get a string representing the system's appdata directory UHD_API std::string get_app_path(void); +//! Get a string representing the system's library directory +UHD_API std::string get_lib_path(void); + //! Get a string representing the system's pkg directory UHD_API std::string get_pkg_path(void); -- cgit v1.2.3