Fix bugs with cmake config files.