You have discovered the magic of Windows. Again.
CMake is a 32-bit process. When Windows launches a 32-bit process on a Win64
machine, it gives the 32-bit process "C:\ProgramFiles (x86)" as the value of
the env var "ProgramFiles". But you are testing it from a 64-bit program,
the default cmd.exe on
Consider the following:
C:\Users\myself\Test>type CMakeLists.txt
cmake_minimum_required(VERSION 2.6)
project (Test)
message (STATUS ENV{ProgramFiles}=$ENV{ProgramFiles})
C:\Users\myself\Test>set ProgramFiles
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Fi