Ejemplo n.º 1
0
    def make(self):
        """implements the make step for cmake projects"""

        self.enterBuildDir()

        command = Arguments.formatCommand([self.makeProgram], self.makeOptions(self.subinfo.options.make.args))
        return utils.system(command)
Ejemplo n.º 2
0
 def createPackage(self):
     if self.androidApkTargets:
         self.enterBuildDir()
         command = Arguments.formatCommand([self.makeProgram], ["create-apk"])
         return utils.system(command)
     CraftCore.log.critical("Failed to detect package target")
     return False
Ejemplo n.º 3
0
 def createPackage(self):
     self.__autodetectAndroidApkTargets()
     if CraftCore.compiler.isAndroid and self.androidApkTargets != None and len(
             self.androidApkTargets) > 0:
         self.enterBuildDir()
         command = Arguments.formatCommand([self.makeProgram],
                                           ["create-apk"])
         return utils.system(command)
Ejemplo n.º 4
0
    def install(self):
        """install the target"""
        if not BuildSystemBase.install(self):
            return False

        self.enterBuildDir()


        with utils.ScopedEnv({"DESTDIR" : self.installDir()}):
            command = Arguments.formatCommand([self.makeProgram], self.makeOptions(self.subinfo.options.install.args))
            return (utils.system(command) and
                    self._fixInstallPrefix())
Ejemplo n.º 5
0
    def configure(self, defines=""):
        """implements configure step for cmake projects"""

        self.enterBuildDir()
        env = {}
        if self.supportsCCACHE and CraftCore.cache.findApplication("ccache"):
            env["CXX"] = CraftCore.standardDirs.craftRoot(
            ) / "dev-utils/ccache/bin" / Path(os.environ["CXX"]).name
            env["CC"] = CraftCore.standardDirs.craftRoot(
            ) / "dev-utils/ccache/bin" / Path(os.environ["CC"]).name
        with utils.ScopedEnv(env):
            command = Arguments.formatCommand(
                ["cmake", "-G", self.__makeFileGenerator()],
                self.configureOptions(defines))
            return utils.system(command)
Ejemplo n.º 6
0
    def configure(self, defines=""):
        """implements configure step for cmake projects"""

        self.enterBuildDir()
        env = {}
        if self.supportsCCACHE:
            cxx = CraftCore.standardDirs.craftRoot()/ "dev-utils/ccache/bin" / Path(os.environ["CXX"]).name
            if CraftCore.compiler.isWindows and not cxx.suffix:
                cxx = Path(str(cxx) + CraftCore.compiler.executableSuffix)
            if cxx.exists():
                env["CXX"] = cxx
                env["CC"] = cxx.parent / Path(os.environ["CC"]).name
        with utils.ScopedEnv(env):
            command = Arguments.formatCommand(["cmake", "-G",  self.__makeFileGenerator()], self.configureOptions(defines))
            return utils.system(command)