additional fixes to cmake files
changes for mingw needed
updates to build system to fix install directories etc..