cmake: add support for build as subproject