def install(self): if not CMakePackageBase.install(self): return False if CraftCore.compiler.isMinGW(): files = os.listdir(os.path.join(self.buildDir(), "lib")) for f in files: if f.endswith("dll.a"): src = os.path.join(self.buildDir(), "lib", f) dest = os.path.join(self.installDir(), "lib", f) if not os.path.exists(dest): utils.copyFile(src, dest, False) elif CraftCore.compiler.isMSVC(): utils.copyFile(os.path.join(self.buildDir(), "lib", "clang.lib"), os.path.join(self.installDir(), "lib", "craft_clang_plugins.lib")) # the build system is broken so.... src = os.path.join(self.installDir(), "bin", f"clang{CraftCore.compiler.executableSuffix}") def maybeCopy(dest): dest = f"{dest}{CraftCore.compiler.executableSuffix}" if not os.path.exists(dest): return utils.copyFile(src, dest) else: return True if CraftCore.compiler.isMSVC(): if not maybeCopy(os.path.join(self.installDir(), "bin", "clang-cl")): return False return maybeCopy(os.path.join(self.installDir(), "bin", "clang++"))
def install(self): if not CMakePackageBase.install(self): return False if craftCompiler.isMinGW(): files = os.listdir(os.path.join(self.buildDir(), "lib")) for f in files: if f.endswith("dll.a"): src = os.path.join(self.buildDir(), "lib", f) dest = os.path.join(self.imageDir(), "lib", f) if not os.path.exists(dest): utils.copyFile(src, dest, False) if OsUtils.isWin(): exeSuffix = ".exe" else: exeSuffix = "" # the build system is broken so.... src = os.path.join(self.imageDir(), "bin", "clang" + exeSuffix) if craftCompiler.isGCCLike(): dest = os.path.join(self.imageDir(), "bin", "clang++" + exeSuffix) elif craftCompiler.isMSVC(): dest = os.path.join(self.imageDir(), "bin", "clang-cl" + exeSuffix) else: craftDebug.log.error("Unknown compiler") if not os.path.exists(dest): utils.copyFile(src, dest) return True
def install(self): if not CMakePackageBase.install(self): return False if compiler.isMinGW(): files = os.listdir(os.path.join(self.buildDir(), "lib")) for f in files: if f.endswith("dll.a"): src = os.path.join(self.buildDir(), "lib", f) dest = os.path.join(self.imageDir(), "lib", f) if not os.path.exists(dest): utils.copyFile(src, dest, False) # the build system is broken so.... src = os.path.join(self.imageDir(), "bin", "clang.exe") if compiler.isMinGW(): dest = os.path.join(self.imageDir(), "bin", "clang++.exe") elif compiler.isMSVC(): dest = os.path.join(self.imageDir(), "bin", "clang-cl.exe") else: EmergeDebug.error("Unknown compiler") if not os.path.exists(dest): utils.copyFile(src, dest) return True
def install(self): if not CMakePackageBase.install(self): return False if compiler.isMinGW(): files = os.listdir(os.path.join(self.buildDir(), "lib")) for f in files: if f.endswith("dll.a"): src = os.path.join(self.buildDir(), "lib", f) dest = os.path.join(self.imageDir(), "lib", f) if not os.path.exists(dest): utils.copyFile(src, dest, False) # the build system is broken so.... src = os.path.join(self.imageDir(), "bin", "clang.exe") if compiler.isMinGW(): dest = os.path.join(self.imageDir(), "bin", "clang++.exe") elif compiler.isMSVC(): dest = os.path.join(self.imageDir(), "bin", "clang-cl.exe") else: EmergeDebug.error("Unknown compiler") if not os.path.exists(dest): utils.copyFile(src, dest) return True