Fix cmake code error

Fixing incorrect variable use