summaryrefslogtreecommitdiffstats
path: root/CMakeInstallation.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeInstallation.cmake')
-rw-r--r--CMakeInstallation.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index 9c92a29..651382c 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -5,7 +5,10 @@ include (${HDF_RESOURCES_DIR}/CMakePackageConfigHelpers.cmake)
#-----------------------------------------------------------------------------
if (WIN32)
find_program (NSIS_EXECUTABLE NSIS.exe PATHS "$ENV{ProgramFiles}\\NSIS" "$ENV{ProgramFiles(x86)}\\NSIS")
- find_program (WIX_EXECUTABLE candle PATHS "$ENV{ProgramFiles}\\WiX\ Toolset\ v3.9\\bin" "$ENV{ProgramFiles(x86)}\\WiX\ Toolset\ v3.9\\bin")
+ if(NOT CPACK_WIX_ROOT)
+ file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT)
+ endif()
+ find_program (WIX_EXECUTABLE candle PATHS "${CPACK_WIX_ROOT}/bin")
endif (WIN32)
#-----------------------------------------------------------------------------