Added support for building in a separate directory