cmake: support bundled build