CMake: MSVC support

add MSVC support to CMake.