diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2016-03-11 14:42:30 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2016-03-11 14:42:30 +0000 |
commit | ee75d9ae4a890d62b009444bed9512b4dab3ee1d (patch) | |
tree | 089d790ca21091372539ddd51f3762af232bf82d /protocols/Telegram/tgl/libevent/cmake/VersionViaGit.cmake | |
parent | bb5bb4407f2578ed8d6dc3b41f6ddb8b798e560c (diff) |
old version
git-svn-id: http://svn.miranda-ng.org/main/trunk@16458 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Telegram/tgl/libevent/cmake/VersionViaGit.cmake')
-rw-r--r-- | protocols/Telegram/tgl/libevent/cmake/VersionViaGit.cmake | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/protocols/Telegram/tgl/libevent/cmake/VersionViaGit.cmake b/protocols/Telegram/tgl/libevent/cmake/VersionViaGit.cmake deleted file mode 100644 index f183a64713..0000000000 --- a/protocols/Telegram/tgl/libevent/cmake/VersionViaGit.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# This module defines the following variables utilizing -# git to determine the parent tag. And if found the macro -# will attempt to parse them in the github tag fomat -# -# Usful for auto-versionin in ou CMakeLists -# -# EVENT_GIT___VERSION_FOUND - Version variables foud -# EVENT_GIT___VERSION_MAJOR - Major version. -# EVENT_GIT___VERSION_MINOR - Minor version -# EVENT_GIT___VERSION_STAGE - Stage version -# -# Example usage: -# -# event_fuzzy_version_from_git() -# if (EVENT_GIT___VERSION_FOUND) -# message("Libvent major=${EVENT_GIT___VERSION_MAJOR}") -# message(" minor=${EVENT_GIT___VERSION_MINOR}") -# message(" patch=${EVENT_GIT___VERSION_PATCH}") -# message(" stage=${EVENT_GIT___VERSION_STAGE}") -# endif() - -include(FindGit) - -macro(event_fuzzy_version_from_git) - set(EVENT_GIT___VERSION_FOUND FALSE) - - # set our defaults. - set(EVENT_GIT___VERSION_MAJOR 2) - set(EVENT_GIT___VERSION_MINOR 1) - set(EVENT_GIT___VERSION_PATCH 5) - set(EVENT_GIT___VERSION_STAGE "beta") - - find_package(Git) - - if (GIT_FOUND) - execute_process( - COMMAND - ${GIT_EXECUTABLE} describe --abbrev=0 - WORKING_DIRECTORY - ${PROJECT_SOURCE_DIR} - RESULT_VARIABLE - GITRET - OUTPUT_VARIABLE - GITVERSION) - - if (GITRET EQUAL 0) - string(REGEX REPLACE "^release-([0-9]+)\\.([0-9]+)\\.([0-9]+)-(.*)" "\\1" EVENT_GIT___VERSION_MAJOR ${GITVERSION}) - string(REGEX REPLACE "^release-([0-9]+)\\.([0-9]+)\\.([0-9]+)-(.*)" "\\2" EVENT_GIT___VERSION_MINOR ${GITVERSION}) - string(REGEX REPLACE "^release-([0-9]+)\\.([0-9]+)\\.([0-9]+)-(.*)" "\\3" EVENT_GIT___VERSION_PATCH ${GITVERSION}) - string(REGEX REPLACE "^release-([0-9]+)\\.([0-9]+)\\.([0-9]+)-([aA-zZ]+)" "\\4" EVENT_GIT___VERSION_STAGE ${GITVERSION}) - endif() - endif() -endmacro() |