2019-10-06 16:13:50 +03:00
|
|
|
# This Python file uses the following encoding: utf-8
|
|
|
|
|
2019-10-06 20:17:52 +03:00
|
|
|
from BuildBotLib.make import Make
|
2020-04-15 10:04:03 +03:00
|
|
|
from BuildBotLib.secretManager import SecretManager
|
2020-07-09 10:45:24 +03:00
|
|
|
import os
|
2019-10-06 16:13:50 +03:00
|
|
|
|
|
|
|
|
2019-10-06 20:17:52 +03:00
|
|
|
class CMake(Make):
|
2019-10-06 16:13:50 +03:00
|
|
|
|
2020-01-31 14:55:49 +03:00
|
|
|
def __init__(self, platform):
|
2020-04-15 10:04:03 +03:00
|
|
|
Make.__init__(self, platform)
|
2020-06-19 18:22:01 +03:00
|
|
|
# self.buildSystems = self.B_CMake
|
2019-10-06 16:13:50 +03:00
|
|
|
|
2020-04-15 10:04:03 +03:00
|
|
|
def makePrefix(self):
|
|
|
|
return "C"
|
2019-10-06 16:13:50 +03:00
|
|
|
|
2020-04-15 10:04:03 +03:00
|
|
|
def mainCmd(self):
|
2019-10-06 20:17:52 +03:00
|
|
|
command = [
|
2020-04-15 10:04:03 +03:00
|
|
|
'cmake',
|
2020-04-25 22:01:36 +03:00
|
|
|
"."
|
2019-10-06 20:17:52 +03:00
|
|
|
]
|
2019-10-06 16:13:50 +03:00
|
|
|
|
2019-10-06 20:17:52 +03:00
|
|
|
return command
|
2019-10-06 16:13:50 +03:00
|
|
|
|
2020-04-15 10:04:03 +03:00
|
|
|
def linuxXmakeCmd(self, props):
|
|
|
|
return self.mainCmd()
|
2019-10-06 16:13:50 +03:00
|
|
|
|
2020-04-15 10:04:03 +03:00
|
|
|
def windowsXmakeCmd(self, props):
|
2020-07-09 10:57:52 +03:00
|
|
|
Qt = os.environ.get('QTDIR')
|
|
|
|
|
2020-07-09 09:52:00 +03:00
|
|
|
command = [
|
|
|
|
'cmake',
|
2020-07-09 10:45:24 +03:00
|
|
|
'-DCMAKE_PREFIX_PATH=' + Qt,
|
2020-07-09 09:52:00 +03:00
|
|
|
"."
|
|
|
|
]
|
|
|
|
|
|
|
|
return command
|
2019-10-06 16:13:50 +03:00
|
|
|
|
2019-10-06 20:17:52 +03:00
|
|
|
def androidXmakeCmd(self, props):
|
2019-12-26 16:18:17 +03:00
|
|
|
secret = SecretManager(self.home + "/buildBotSecret/secret.json")
|
2019-10-06 16:13:50 +03:00
|
|
|
|
2019-10-06 20:17:52 +03:00
|
|
|
command = [
|
2020-04-15 10:04:03 +03:00
|
|
|
'cmake',
|
|
|
|
'-DANDROID_ABI=arm64-v8a',
|
|
|
|
'-DANDROID_BUILD_ABI_arm64-v8a=ON',
|
|
|
|
'-DANDROID_BUILD_ABI_armeabi-v7a=ON',
|
2019-10-06 20:17:52 +03:00
|
|
|
'-DSIGN_PATH="' + secret.getValue('SIGPATH') + '"',
|
|
|
|
'-DSIGN_ALIES="quasarapp"',
|
|
|
|
'-DSIGN_STORE_PASSWORD="' + secret.getValue('SIGPASS') + '"'
|
2019-10-06 16:13:50 +03:00
|
|
|
|
2019-10-06 20:17:52 +03:00
|
|
|
]
|
2019-10-06 16:13:50 +03:00
|
|
|
|
2019-10-06 20:17:52 +03:00
|
|
|
return command
|