More generality in cmake structure