Description:
When building with cmake CMAKE_INSTALL_PREFIX always contains the path ProgramFiles (x86), even on a 64-bit System.
How to repeat:
Add MESSAGE(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
to your CMakeLists.txt and execute
cmake -G "Visual Studio 8 2005 Win64"
Suggested fix:
IF(WIN32)
IF (CMAKE_SIZEOF_VOID_P MATCHES 8)
#64-bit build
FILE(TO_CMAKE_PATH "$ENV{ProgramW6432}/MySQL/MySQL Connector C" CMAKE_INSTALL_PREFIX)
ELSE (CMAKE_SIZEOF_VOID_P MATCHES 8)
IF($ENV{ProgramW6432})
#32 bit build on 64-bit platform
FILE(TO_CMAKE_PATH "$ENV{ProgramFiles (x86)}/MySQL/MySQL Connector C" CMAKE_INSTALL_PREFIX)
ELSE($ENV{ProgramW6432})
#32 bit build on 32-bit platform
FILE(TO_CMAKE_PATH "$ENV{ProgramFiles}/MySQL/MySQL Connector C" CMAKE_INSTALL_PREFIX)
ENDIF($ENV{ProgramW6432})
ENDIF(CMAKE_SIZEOF_VOID_P MATCHES 8)
ENDIF(WIN32)