def ComputeOutputDir(params):
 generator_dir = os.path.relpath((params['options'].generator_output or '.'))
 output_dir = params.get('generator_flags', {}).get('output_dir', 'out')
 return os.path.normpath(os.path.join(generator_dir, output_dir))

def ComputeOutputDir ( params ) : generator_dir = os . path . relpath ( ( params [ 'options' ] . generator_output or '.' ) ) output_dir = params . get ( 'generator_flags' , { } ) . get ( 'output_dir' , 'out' ) return os . path . normpath ( os . path . join ( generator_dir , output_dir ) )
returns the path from the toplevel_dir to the build output directory .