use proper cmake code to find R