65 lines
1.7 KiB
Python
Raw Normal View History

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
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-10-08 15:35:25 +03:00
options = [
'cmake -DCMAKE_PREFIX_PATH=%QTDIR%',
'-DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc',
'-DQT_QMAKE_EXECUTABLE=%QTDIR%/bin/qmake.exe',
'"-GCodeBlocks - MinGW Makefiles" .'
]
return ' '.join(options)
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")
2021-03-30 20:03:18 +03:00
toochainFile = 'build/cmake/android.toolchain.cmake'
2019-10-06 16:13:50 +03:00
2020-10-08 15:35:25 +03:00
options = [
'cmake -DCMAKE_PREFIX_PATH=$QTDIR',
2021-03-30 20:23:40 +03:00
'-DQT_DIR=$QTDIR',
2020-10-08 15:35:25 +03:00
'-DANDROID_ABI=arm64-v8a',
'-DANDROID_BUILD_ABI_arm64-v8a=ON',
'-DANDROID_BUILD_ABI_armeabi-v7a=ON',
'-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/' + toochainFile,
2020-10-12 16:29:54 +03:00
'-DSIGN_PATH="' + secret.getValue('SIGPATH') + '"',
2020-10-12 16:18:13 +03:00
'-DSIGN_ALIES="quasarapp"',
'-DSIGN_STORE_PASSWORD="' + secret.getValue('SIGPASS') + '"',
2020-10-08 21:08:08 +03:00
'.'
2020-10-08 15:35:25 +03:00
]
return ' '.join(options)
def wasmXmakeCmd(self, props):
options = [
'cmake -DCMAKE_PREFIX_PATH=$QTDIR',
2020-10-08 21:08:08 +03:00
'-DTARGET_PLATFORM_TOOLCHAIN=wasm32',
'.'
2020-10-08 15:35:25 +03:00
]
return ' '.join(options)