added new version system

This commit is contained in:
Andrei Yankovich 2021-10-05 00:26:25 +03:00
parent 3172bad812
commit 016b722da1
5 changed files with 15 additions and 3 deletions

View File

@ -17,6 +17,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
updateGitVars()
add_definitions(-DHEART_LIBRARY)
if (HEART_SSL)
@ -99,4 +101,4 @@ target_include_directories(${PROJECT_NAME} PUBLIC ${PUBLIC_INCUDE_DIR})
target_include_directories(${PROJECT_NAME} PRIVATE ${PRIVATE_INCUDE_DIR})
setVersion(1 1 1)
setVersion(1 1 ${GIT_COMMIT_COUNT})

View File

@ -17,4 +17,8 @@ bool init() {
return true;
}
QString heartLibVersion() {
return HEART_VERSION;
}
}

View File

@ -184,6 +184,12 @@ namespace QH {
*/
bool HEARTSHARED_EXPORT init();
/**
* @brief heartLibVersion This method return version of library in format : major.commit.hash
* @return
*/
QString heartLibVersion();
/** @brief The PKG namesapce - this namespace contains all default packages of the Heart library.
* If you want create a pool request for Heart Library with own implemented packages
* you need to create a new package into a PKG namesapce.

View File

@ -11,7 +11,7 @@
#include <QtCore/qglobal.h>
#define HEART_BUILD_LVL @HEART_BUILD_LVL@
#define HEART_VERSION "1.1.@GIT_COMMIT_COUNT@.@GIT_COMMIT_HASH@"
#if defined(HEART_LIBRARY)
# define HEARTSHARED_EXPORT Q_DECL_EXPORT
#else

@ -1 +1 @@
Subproject commit 5f1ebf22e2bc4dd1fb73b753dcd93b87aa572a42
Subproject commit 7646d2a6dbafc71d525d2e056f7df92e663fc0ac