cmake: use PATH instead of DIRECTORY for g_f_c()