fixed unmatched if clause for cmake