kfilereplace: allow build without top-level cmake invocation