Converted library and most apps to CMake structure

* Creates libpkmds lib,dll,so as appropriate