Added a extra Cmake step to check for dependencies
Some modification for Windows