Fix version auto generation.
This commit is contained in:
parent
25c82076da
commit
a90807fccb
@ -141,10 +141,11 @@ if(UNIX)
|
|||||||
target_link_libraries(uhub-admin adcclient adc network utils)
|
target_link_libraries(uhub-admin adcclient adc network utils)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(GIT_FOUND)
|
if(GIT_FOUND AND IS_DIRECTORY ".git")
|
||||||
execute_process(COMMAND ${GIT_EXECUTABLE} show -s --pretty=format:%h OUTPUT_VARIABLE UHUB_REVISION)
|
execute_process(COMMAND ${GIT_EXECUTABLE} show -s --pretty=format:%h OUTPUT_VARIABLE UHUB_REVISION)
|
||||||
set (UHUB_GIT_VERSION "${UHUB_VERSION_MAJOR}.${UHUB_VERSION_MINOR}.${UHUB_VERSION_PATCH}-git-${UHUB_REVISION}")
|
set (UHUB_GIT_VERSION "${UHUB_VERSION_MAJOR}.${UHUB_VERSION_MINOR}.${UHUB_VERSION_PATCH}-git-${UHUB_REVISION}")
|
||||||
else()
|
else()
|
||||||
|
set (UHUB_GIT_VERSION "${UHUB_VERSION_MAJOR}.${UHUB_VERSION_MINOR}.${UHUB_VERSION_PATCH}-release")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(OPENSSL_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
|
@ -23,14 +23,12 @@
|
|||||||
#define VERSION "@UHUB_VERSION_MAJOR@.@UHUB_VERSION_MINOR@.@UHUB_VERSION_PATCH@"
|
#define VERSION "@UHUB_VERSION_MAJOR@.@UHUB_VERSION_MINOR@.@UHUB_VERSION_PATCH@"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GIT_REVISION "@UHUB_REVISION@"
|
|
||||||
#define GIT_VERSION "@UHUB_GIT_VERSION@"
|
#define GIT_VERSION "@UHUB_GIT_VERSION@"
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
#define PRODUCT "uhub"
|
#define PRODUCT "uhub"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define REVISION GIT_REVISION
|
|
||||||
#define PRODUCT_STRING PRODUCT "/" GIT_VERSION
|
#define PRODUCT_STRING PRODUCT "/" GIT_VERSION
|
||||||
|
|
||||||
#ifndef COPYRIGHT
|
#ifndef COPYRIGHT
|
||||||
|
Loading…
Reference in New Issue
Block a user