Beispiel #1
0
def __GetPackageIncludePath(config: Config, package: Package, absPathInsidePackage: str, pathType: int) -> str:
    if pathType == CMakePathType.LocalRelative:
        if package.AbsolutePath is None:
            raise Exception("Invalid package")
        if absPathInsidePackage.startswith(package.AbsolutePath + '/'):
            lenAbsPath = len(package.AbsolutePath)
            return absPathInsidePackage[lenAbsPath+1:]
        return IOUtil.RelativePath(absPathInsidePackage, package.AbsolutePath)
    elif pathType == CMakePathType.Relative:
        return GetSDKBasedPathUsingCMakeVariable(config, absPathInsidePackage)
    raise Exception("Unsupported path type")