[CMake] Changes done for cmake compile under windows

Note, not tested on Linux