Fix cmake configure arguments
Rearrange package priority