Set the api dir from the source dir parameter.