aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2016-07-08 23:25:14 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2016-07-09 07:22:09 +0000
commit8e1cc70fd57e958ef5f062f1a6367d85ebc9fed1 (patch)
tree166ad4824545cbb6d15709d61049e4f0a6b3a9d2
parent01c6483b45a91f8c03eeb4bf80a15a5e174ffb18 (diff)
Fix detection of NSIS/WiX install path when running a win64 CMake
On x86 system: System32\cmd.exe ProgramFiles=C:\Program Files On x64 system: System32\cmd.exe ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files Syswow64\cmd.exe ProgramFiles=C:\Program Files (x86) ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files Change-Id: I32d52219366b299f1e8099dc6d7737970dc398dd Reviewed-on: https://code.wireshark.org/review/16346 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r--cmake/modules/FindNSIS.cmake3
-rw-r--r--cmake/modules/FindWiX.cmake8
2 files changed, 7 insertions, 4 deletions
diff --git a/cmake/modules/FindNSIS.cmake b/cmake/modules/FindNSIS.cmake
index 5429ac6..1b68cd3 100644
--- a/cmake/modules/FindNSIS.cmake
+++ b/cmake/modules/FindNSIS.cmake
@@ -6,7 +6,8 @@
# CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS - System runtime DLLs
# Find makensis
+set(_PF86 "PROGRAMFILES(x86)")
find_program(MAKENSIS_EXECUTABLE makensis
- PATH "$ENV{PROGRAMFILES}/NSIS" "$ENV{PROGRAMW6432}/NSIS"
+ PATH "$ENV{PROGRAMFILES}/NSIS" "$ENV{${_PF86}}/NSIS" "$ENV{PROGRAMW6432}/NSIS"
DOC "Path to the makensis utility."
)
diff --git a/cmake/modules/FindWiX.cmake b/cmake/modules/FindWiX.cmake
index f10f225..1761bbb 100644
--- a/cmake/modules/FindWiX.cmake
+++ b/cmake/modules/FindWiX.cmake
@@ -5,20 +5,22 @@
# MAKEWIX_EXECUTABLE - path to the candle utility.
# CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS - System runtime DLLs
+set(_PF86 "PROGRAMFILES(x86)")
+
# Find candle
find_program(WIX_CANDLE_EXECUTABLE candle
- PATH "$ENV{PROGRAMFILES}/WiX Toolset v3.10/bin" "$ENV{PROGRAMW6432}/WiX Toolset v3.10/bin"
+ PATH "$ENV{PROGRAMFILES}/WiX Toolset v3.10/bin" "$ENV{${_PF86}}/WiX Toolset v3.10/bin" "$ENV{PROGRAMW6432}/WiX Toolset v3.10/bin"
DOC "Path to the WiX candle utility."
)
# Find light
find_program(WIX_LIGHT_EXECUTABLE light
- PATH "$ENV{PROGRAMFILES}/WiX Toolset v3.10/bin" "$ENV{PROGRAMW6432}/WiX Toolset v3.10/bin"
+ PATH "$ENV{PROGRAMFILES}/WiX Toolset v3.10/bin" "$ENV{${_PF86}}/WiX Toolset v3.10/bin" "$ENV{PROGRAMW6432}/WiX Toolset v3.10/bin"
DOC "Path to the WiX light utility."
)
# Find light
find_program(WIX_HEAT_EXECUTABLE heat
- PATH "$ENV{PROGRAMFILES}/WiX Toolset v3.10/bin" "$ENV{PROGRAMW6432}/WiX Toolset v3.10/bin"
+ PATH "$ENV{PROGRAMFILES}/WiX Toolset v3.10/bin" "$ENV{${_PF86}}/WiX Toolset v3.10/bin" "$ENV{PROGRAMW6432}/WiX Toolset v3.10/bin"
DOC "Path to the WiX heat utility."
)