Use the full gperf path to call gperf, instead of just calling gperf
find_program(GPERF gperf) can find gperf in paths distinct from the PATH ENV, the actual path is stored in GPERF. But you use gperf to call ist instead of ${GPERF}. This leads to errors, when gperf is not in the PATH ENV.