reorder cmake dependencies