Remove cmake workarounds and replace them with explicit references