changes to the cmake files and a recieve function for the plugin