Fix a cmake warning, using variable wrong