Seems fragile. Why not use `find_program` (which uses the system path) to find some Matlab program, and then determine the path from that?