Fixed cmake when using a build dir