Improved CMakefiles to compile in windows