Update build files after plain_mechanism split

This became necessary after 22d6a9740
Update build files to include metadata

This became necessary after b9c274814
Merge pull request #1029 from olafmandel/master

Update cmake, mingw32 and msvc builds