changed cmakelists to be backwards compatible