summaryrefslogtreecommitdiffstats
path: root/host/Modules
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-04-18 17:17:32 -0700
committerJosh Blum <josh@joshknows.com>2011-04-19 14:20:37 -0700
commit06e10b5f469b8b06af33a8a95a6302a1e365b396 (patch)
tree6697efbaaa3b0295d1d00137440bfba9e71872f5 /host/Modules
parent8212f22075f5a1b8b1818d6e3df5a88a0a697713 (diff)
downloaduhd-06e10b5f469b8b06af33a8a95a6302a1e365b396.tar.gz
uhd-06e10b5f469b8b06af33a8a95a6302a1e365b396.tar.bz2
uhd-06e10b5f469b8b06af33a8a95a6302a1e365b396.zip
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.
Diffstat (limited to 'host/Modules')
-rw-r--r--host/Modules/UHDPackage.cmake10
1 files changed, 10 insertions, 0 deletions
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