aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/CMakeLists.txt3
-rw-r--r--host/lib/constants.hpp.in3
-rw-r--r--host/lib/utils/paths.cpp4
3 files changed, 6 insertions, 4 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index 48cfe742e..b117b99ce 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -53,6 +53,9 @@ INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/utils/CMakeLists.txt)
########################################################################
# Append to the list of sources for lib uhd
########################################################################
+FILE(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/${PKG_DATA_DIR} FULL_PKG_DATA_DIR)
+MESSAGE(STATUS "Full package data directory: ${FULL_PKG_DATA_DIR}")
+
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/constants.hpp.in
${CMAKE_CURRENT_BINARY_DIR}/constants.hpp
diff --git a/host/lib/constants.hpp.in b/host/lib/constants.hpp.in
index aa51e558c..2ed4e302f 100644
--- a/host/lib/constants.hpp.in
+++ b/host/lib/constants.hpp.in
@@ -23,7 +23,6 @@
//these should be pre-processor macros to avoid static initialization issues
#define UHD_VERSION_STRING "@CPACK_PACKAGE_VERSION@"
-#define UHD_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
-#define UHD_PKG_DATA_DIR "@PKG_DATA_DIR@"
+#define FULL_PKG_DATA_DIR "@FULL_PKG_DATA_DIR@"
#endif /* INCLUDED_LIBUHD_CONSTANTS_HPP */
diff --git a/host/lib/utils/paths.cpp b/host/lib/utils/paths.cpp
index 9ac20d855..3f29945dd 100644
--- a/host/lib/utils/paths.cpp
+++ b/host/lib/utils/paths.cpp
@@ -72,13 +72,13 @@ static std::vector<fs::path> get_env_paths(const std::string &var_name){
**********************************************************************/
std::vector<fs::path> get_image_paths(void){
std::vector<fs::path> paths = get_env_paths("UHD_IMAGE_PATH");
- paths.push_back(fs::path(UHD_INSTALL_PREFIX) / UHD_PKG_DATA_DIR / "images");
+ paths.push_back(fs::path(FULL_PKG_DATA_DIR) / "images");
return paths;
}
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_INSTALL_PREFIX) / UHD_PKG_DATA_DIR / "modules");
+ paths.push_back(fs::path(FULL_PKG_DATA_DIR) / "modules");
return paths;
}