Add possibility to specify UHUB_REVISION manually.

This commit is contained in:
Boris Pek 2012-10-13 19:10:16 +03:00
parent af083efb0c
commit dcfcf3110d
1 changed files with 12 additions and 5 deletions

View File

@ -163,13 +163,20 @@ if(UNIX)
endif()
endif()
if(GIT_FOUND AND IS_DIRECTORY ".git")
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}")
else()
set (UHUB_GIT_VERSION "${UHUB_VERSION_MAJOR}.${UHUB_VERSION_MINOR}.${UHUB_VERSION_PATCH}-release")
if (NOT UHUB_REVISION AND GIT_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} show -s --pretty=format:%h OUTPUT_VARIABLE UHUB_REVISION_TEMP)
if (UHUB_REVISION_TEMP)
set (UHUB_REVISION "git-${UHUB_REVISION_TEMP}")
endif()
endif()
if (NOT UHUB_REVISION)
set (UHUB_REVISION "release")
endif()
set (UHUB_GIT_VERSION "${UHUB_VERSION_MAJOR}.${UHUB_VERSION_MINOR}.${UHUB_VERSION_PATCH}-${UHUB_REVISION}")
message (STATUS "Current uHub version: ${UHUB_GIT_VERSION}")
if(OPENSSL_FOUND)
add_definitions(-DSSL_SUPPORT=1)
include_directories(${OPENSSL_INCLUDE_DIR})