summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-05-02 19:44:43 (GMT)
committerBrad King <brad.king@kitware.com>2014-05-08 17:24:49 (GMT)
commite423f1c05d6d11483deb7acd135623df8de45655 (patch)
treec242d9a3aa6059453c306d99d31b890a3c628f26 /Modules/Platform
parentc179b2898eb507c0e4e169665d8698f1efb05f16 (diff)
downloadCMake-e423f1c05d6d11483deb7acd135623df8de45655.zip
CMake-e423f1c05d6d11483deb7acd135623df8de45655.tar.gz
CMake-e423f1c05d6d11483deb7acd135623df8de45655.tar.bz2
Windows: Avoid () in environment variable references
Use nested variable evaluation instead.
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/WindowsPaths.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/Platform/WindowsPaths.cmake b/Modules/Platform/WindowsPaths.cmake
index 3240c23..658de3b 100644
--- a/Modules/Platform/WindowsPaths.cmake
+++ b/Modules/Platform/WindowsPaths.cmake
@@ -56,9 +56,10 @@ else()
if(DEFINED "ENV{ProgramFiles}")
list(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles}")
endif()
- if(DEFINED "ENV{ProgramFiles(x86)}")
+ set(programfilesx86 "ProgramFiles(x86)")
+ if(DEFINED "ENV{${programfilesx86}}")
# 64-bit binary. 32-bit program files are in ProgramFiles(x86).
- list(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles(x86)}")
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{${programfilesx86}}")
elseif(DEFINED "ENV{SystemDrive}")
# Guess the 32-bit program files location.
if(EXISTS "$ENV{SystemDrive}/Program Files (x86)")