diff --git a/ProjectOut.cmake b/ProjectOut.cmake index 114a1aa..994e7b1 100644 --- a/ProjectOut.cmake +++ b/ProjectOut.cmake @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2019 QuasarApp. +# Copyright (C) 2018-2020 QuasarApp. # Distributed under the MIT software license, see the accompanying # Everyone is permitted to copy and distribute verbatim copies # of this license document, but changing it is not allowed. diff --git a/QuasarAppCITargets.cmake b/QuasarAppCITargets.cmake new file mode 100644 index 0000000..29d0e78 --- /dev/null +++ b/QuasarAppCITargets.cmake @@ -0,0 +1,123 @@ +# +# Copyright (C) 2018-2020 QuasarApp. +# Distributed under the MIT software license, see the accompanying +# Everyone is permitted to copy and distribute verbatim copies +# of this license document, but changing it is not allowed. +# + +if(DEFINED QUASARAPP_DEFAULT_TARGETS) + return() +else() + set(QUASARAPP_DEFAULT_TARGETS 1) +endif() + +function(initQmake) + + set(Q_MAKE ${Qt5_DIR}/bin/qmake) + if (WIN32) + set(Q_MAKE ${Qt5_DIR}/bin/qmake.exe) + endif (WIN32) + +endfunction() + +function(initTests testExec arg) + + ADD_CUSTOM_TARGET( + deployTest + COMMAND ${testExec} ${arg} + COMMENT "=================== Deploy Test ===================" + ) + + initQmake() + + ADD_CUSTOM_TARGET( + test + COMMAND cqtdeployer -bin ${testExec} -qmake ${Q_MAKE} + COMMENT "=================== Run Test ===================" + DEPENDS deployTest + ) + +endfunction() + +function(initTests testExec) + + ADD_CUSTOM_TARGET( + deployTest + COMMAND ${testExec} + COMMENT "=================== Deploy Test ===================" + ) + + initQmake() + + ADD_CUSTOM_TARGET( + test + COMMAND cqtdeployer -bin ${testExec} -qmake ${Q_MAKE} + COMMENT "=================== Run Test ===================" + DEPENDS deployTest + ) + +endfunction() + +function(initTests ) + + ADD_CUSTOM_TARGET( + test + COMMENT "=================== Run Test ===================" + ) + +endfunction() + +function(initDeploy targets) + + if(DEFINED targets) + initQmake() + + ADD_CUSTOM_TARGET( + deploy + COMMAND cqtdeployer -bin ${targets} -qmake ${Q_MAKE} + COMMENT "=================== Run deploy ===================" + DEPENDS deployTest + ) + else(DEFINED testExec) + ADD_CUSTOM_TARGET( + deploy + COMMENT "=================== Run deploy ===================" + ) + endif(DEFINED testExec) + +endfunction() + +function(initRelease) + + ADD_CUSTOM_TARGET( + release + COMMENT "=================== Run release ===================" + ) + +endfunction() + +function(initDeploy) + + ADD_CUSTOM_TARGET( + deploy + COMMENT "=================== Run deploy ===================" + ) + +endfunction() + +function(initRelease) + + ADD_CUSTOM_TARGET( + release + COMMENT "=================== Run release ===================" + ) + +endfunction() + +function(initAll) + initTests() + initDeploy() + initRelease() + +endfunction() + diff --git a/Version.cmake b/Version.cmake index 6b96fa8..a7a2beb 100644 --- a/Version.cmake +++ b/Version.cmake @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2019 QuasarApp. +# Copyright (C) 2018-2020 QuasarApp. # Distributed under the MIT software license, see the accompanying # Everyone is permitted to copy and distribute verbatim copies # of this license document, but changing it is not allowed. diff --git a/ccache.cmake b/ccache.cmake index 251baaa..2d2da2b 100644 --- a/ccache.cmake +++ b/ccache.cmake @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2019 QuasarApp. +# Copyright (C) 2018-2020 QuasarApp. # Distributed under the MIT software license, see the accompanying # Everyone is permitted to copy and distribute verbatim copies # of this license document, but changing it is not allowed. diff --git a/crossplatform/crossplatform.cmake b/crossplatform/crossplatform.cmake index 068d35f..08aaf06 100755 --- a/crossplatform/crossplatform.cmake +++ b/crossplatform/crossplatform.cmake @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2019 QuasarApp. +# Copyright (C) 2018-2020 QuasarApp. # Distributed under the MIT software license, see the accompanying # Everyone is permitted to copy and distribute verbatim copies # of this license document, but changing it is not allowed.