InstallRequiredSystemLibraries: Fix ENV{ProgramFiles(x86)} reference

The fix in commit v3.1.0-rc1~544^2~5 (Windows: Avoid () in environment
variable references, 2014-05-02) introduced a set() command in the
middle of an argument list.  Move it to before the find_path() call.
This commit is contained in:
Brad King 2016-05-12 10:54:59 -04:00
parent cb704c0871
commit bbf8c03b4f
1 changed files with 1 additions and 1 deletions

View File

@ -171,12 +171,12 @@ if(MSVC)
# Find the runtime library redistribution directory.
get_filename_component(msvc_install_dir
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${v}.0;InstallDir]" ABSOLUTE)
set(programfilesx86 "ProgramFiles(x86)")
find_path(MSVC${v}_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT
PATHS
"${msvc_install_dir}/../../VC/redist"
"${base_dir}/VC/redist"
"$ENV{ProgramFiles}/Microsoft Visual Studio ${v}.0/VC/redist"
set(programfilesx86 "ProgramFiles(x86)")
"$ENV{${programfilesx86}}/Microsoft Visual Studio ${v}.0/VC/redist"
)
mark_as_advanced(MSVC${v}_REDIST_DIR)