diff options
author | Ryan Volz <rvolz@mit.edu> | 2019-10-29 17:13:58 -0400 |
---|---|---|
committer | atrnati <54334261+atrnati@users.noreply.github.com> | 2020-02-07 09:12:56 -0600 |
commit | 965ad0527935f37d99f5f3f28dd27328e6af1ef8 (patch) | |
tree | 556136a4846361602deb293285356d05b3bf2e25 /host/include | |
parent | 2fab118bdc5afd5967ff876cc574bebef0ba0f67 (diff) | |
download | uhd-965ad0527935f37d99f5f3f28dd27328e6af1ef8.tar.gz uhd-965ad0527935f37d99f5f3f28dd27328e6af1ef8.tar.bz2 uhd-965ad0527935f37d99f5f3f28dd27328e6af1ef8.zip |
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).
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/utils/paths.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
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); |