def AddBPrefix(prefix): """ Add a path to the list searched for host binaries and include dirs. """ AddHostBinarySearchPath(prefix) prefix = pathtools.normalize(prefix) if pathtools.isdir(prefix) and not prefix.endswith('/'): prefix += '/' # Add prefix/ to the library search dir if it exists if pathtools.isdir(prefix): env.append('SEARCH_DIRS', prefix) # Add prefix/include to isystem if it exists include_dir = prefix + 'include' if pathtools.isdir(include_dir): env.append('ISYSTEM_USER', include_dir)
def AddHostBinarySearchPath(prefix): """ Add a path to the list searched for host binaries. """ prefix = pathtools.normalize(prefix) if pathtools.isdir(prefix) and not prefix.endswith('/'): prefix += '/' env.append('BPREFIXES', prefix)