• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1set(PROJECT_VERSION_MAJOR "2")
2set(PROJECT_VERSION_MINOR "0")
3set(PROJECT_VERSION_PATCH "2")
4set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
5set(PROJECT_VERSION_FULL "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
6
7set(LIBRARY_VERSION "3.0.1")
8set(LIBRARY_SOVERSION "3")
9
10## Git revision number ##
11if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
12  execute_process(COMMAND git describe --tags HEAD
13    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
14    OUTPUT_VARIABLE GIT_DESCRIBE_TAGS ERROR_QUIET)
15  if(GIT_DESCRIBE_TAGS)
16    string(REGEX REPLACE "^v(.*)" "\\1" GIT_REVISION "${GIT_DESCRIBE_TAGS}")
17    string(STRIP "${GIT_REVISION}" GIT_REVISION)
18    if(GIT_REVISION)
19      set(PROJECT_VERSION_FULL "${GIT_REVISION}")
20    endif(GIT_REVISION)
21  endif(GIT_DESCRIBE_TAGS)
22endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
23