From 46d0e64859cfabfc24ea04051fca624a185bff8b Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 18 Apr 2011 17:17:32 -0700 Subject: uhd: use UHD_PKG_DATA_PATH environment variable to override the one in constants The installer sets UHD_PKG_DATA_PATH, we can can handle transplanted builds. --- host/Modules/UHDPackage.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 1988c7f11..416d89998 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -144,5 +144,15 @@ SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel, libusb1") ######################################################################## SET(CPACK_NSIS_MODIFY_PATH ON) +SET(HLKM_ENV "\\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\"") + +SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " + WriteRegStr HKLM ${HLKM_ENV} \\\"UHD_PKG_DATA_PATH\\\" \\\"$INSTDIR\\\\share\\\\uhd\\\" +") + +SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " + DeleteRegValue HKLM ${HLKM_ENV} \\\"UHD_PKG_DATA_PATH\\\" +") + ######################################################################## INCLUDE(CPack) #include after setting vars -- cgit v1.2.3