mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
uhd: add CMake flag for the Windows registry key to specify UHD images directory
This commit is contained in:
parent
db3db1e2f0
commit
23ed1af481
@ -75,9 +75,9 @@ OPTION(UHD_IMAGES_DIR "Path to installed UHD image binaries.")
|
||||
MESSAGE( STATUS "Using UHD Images Directory: ${UHD_IMAGES_DIR}" )
|
||||
ADD_DEFINITIONS(-DUHD_IMAGES_DIR=${UHD_IMAGES_DIR})
|
||||
|
||||
IF(DEFINED USE_NIUSRP_WINREG_KEY)
|
||||
ADD_DEFINITIONS(-DUSE_NIUSRP_WINREG_KEY)
|
||||
ENDIF(DEFINED USE_NIUSRP_WINREG_KEY)
|
||||
IF(DEFINED UHD_IMAGES_DIR_WINREG_KEY)
|
||||
ADD_DEFINITIONS(-DUHD_IMAGES_DIR_WINREG_KEY=${UHD_IMAGES_DIR_WINREG_KEY})
|
||||
ENDIF(DEFINED UHD_IMAGES_DIR_WINREG_KEY)
|
||||
|
||||
########################################################################
|
||||
# Local Include Dir
|
||||
|
||||
@ -41,10 +41,6 @@
|
||||
#include <windows.h> //GetTempPath
|
||||
#endif
|
||||
|
||||
#ifdef USE_NIUSRP_WINREG_KEY
|
||||
#define NIUSRP_WINREG_KEY "[HKLM\\Software\\National Instruments\\NI-USRP\\DriverBitfilesDir]"
|
||||
#endif
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
/*! Get the value of an environment variable.
|
||||
@ -287,8 +283,8 @@ std::string uhd::get_images_dir(const std::string &search_paths) {
|
||||
* (see below). Making a local copy for const correctness. */
|
||||
std::string _search_paths = search_paths;
|
||||
|
||||
#ifdef USE_NIUSRP_WINREG_KEY
|
||||
_search_paths = std::string(NIUSRP_WINREG_KEY) + "," + search_paths;
|
||||
#ifdef UHD_IMAGES_DIR_WINREG_KEY
|
||||
_search_paths = std::string("UHD_IMAGES_DIR_WINREG_KEY") + "," + search_paths;
|
||||
#endif
|
||||
|
||||
/* Now we will parse and attempt to qualify the paths in the `search_paths`
|
||||
|
||||
Loading…
Reference in New Issue
Block a user