Windows: find_program fails to find program when NAMES are specified
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
On Windows, this fragment in a FindMono.cmake script works fine:
FIND_PROGRAM (MCS_EXECUTABLE mcs
"$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
"$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
/bin
/usr/bin
/usr/local/bin
)
But if I modify it to search for the program under alternate names as follows, it doesn't find any of them:
FIND_PROGRAM (MCS_EXECUTABLE
NAMES mcs mcs1
"$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
"$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
/bin
/usr/bin
/usr/local/bin
)
This works fine on Linux and OS X. I tried both 2.6.3 and 2.6.4, and both failed.