summaryrefslogtreecommitdiffstats
path: root/host/lib/utils/paths.cpp
diff options
context:
space:
mode:
authorMichael West <michael.west@ettus.com>2013-11-20 11:57:38 -0800
committerMichael West <michael.west@ettus.com>2013-11-20 11:57:38 -0800
commit1fe3db82d6d292a186fe26e728dfdf68db4db056 (patch)
tree55e4aecf11f2387cde6486dbb671aaa6bdebe470 /host/lib/utils/paths.cpp
parenta0bae5347bd542b6f84601f8f0c8c70137ea44d1 (diff)
parent58f4af976d64765c2402e1ce00ee78f4aae51881 (diff)
downloaduhd-1fe3db82d6d292a186fe26e728dfdf68db4db056.tar.gz
uhd-1fe3db82d6d292a186fe26e728dfdf68db4db056.tar.bz2
uhd-1fe3db82d6d292a186fe26e728dfdf68db4db056.zip
Merged in branch master
Diffstat (limited to 'host/lib/utils/paths.cpp')
-rw-r--r--host/lib/utils/paths.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/host/lib/utils/paths.cpp b/host/lib/utils/paths.cpp
index f9d8b613c..3e2bea1c6 100644
--- a/host/lib/utils/paths.cpp
+++ b/host/lib/utils/paths.cpp
@@ -34,8 +34,19 @@
namespace fs = boost::filesystem;
/***********************************************************************
+ * Get a list of paths for an environment variable
+ **********************************************************************/
+static std::string get_env_var(const std::string &var_name, const std::string &def_val = ""){
+ const char *var_value_ptr = std::getenv(var_name.c_str());
+ return (var_value_ptr == NULL)? def_val : var_value_ptr;
+}
+
+static std::vector<fs::path> get_env_paths(const std::string &var_name){
+
+/***********************************************************************
* Determine the paths separator
**********************************************************************/
+
#ifdef UHD_PLATFORM_WIN32
static const std::string env_path_sep = ";";
#else
@@ -46,16 +57,6 @@ namespace fs = boost::filesystem;
boost::tokenizer<boost::char_separator<char> > \
(inp, boost::char_separator<char>(env_path_sep.c_str()))
-/***********************************************************************
- * Get a list of paths for an environment variable
- **********************************************************************/
-static std::string get_env_var(const std::string &var_name, const std::string &def_val = ""){
- const char *var_value_ptr = std::getenv(var_name.c_str());
- return (var_value_ptr == NULL)? def_val : var_value_ptr;
-}
-
-static std::vector<fs::path> get_env_paths(const std::string &var_name){
-
std::string var_value = get_env_var(var_name);
//convert to filesystem path, filter blank paths
@@ -85,6 +86,7 @@ std::vector<fs::path> get_image_paths(void){
std::vector<fs::path> get_module_paths(void){
std::vector<fs::path> paths = get_env_paths("UHD_MODULE_PATH");
paths.push_back(fs::path(uhd::get_pkg_path()) / UHD_LIB_DIR / "uhd" / "modules");
+ paths.push_back(fs::path(uhd::get_pkg_path()) / "share" / "uhd" / "modules");
return paths;
}