Rewrite of cmake lists, adding install support, test support and removing use of recursive file globs