summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-08-15 12:18:35 -0700
committerJosh Blum <josh@joshknows.com>2010-08-15 12:18:35 -0700
commit7b084e3af206afa20ff5a026ebf5d7e49a755def (patch)
tree04f304cb096f30dbd965e69dc7c7efb804a93ccf /host
parent98ba0cc067489d417342314a7e7408d2dbbc8250 (diff)
downloaduhd-7b084e3af206afa20ff5a026ebf5d7e49a755def.tar.gz
uhd-7b084e3af206afa20ff5a026ebf5d7e49a755def.tar.bz2
uhd-7b084e3af206afa20ff5a026ebf5d7e49a755def.zip
uhd: use cmake to convert the pkg data dir to native system format
Diffstat (limited to 'host')
-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;
}