MinGW setup scripts

Added automated setup scripts in the directory mingw_setup. Also sanitized the CMakeLists.txt.