Finalised Cmakelists to do various complex things