Fix cmake protection code that wasn't actuall protecting anything.