Avoid cyclic dependencies. Will have to refactor the cmake macros.