Fix build windows

Fix and clean CMake building and installing, and Swig binding for Windows.