diff options
author | Walter Gray <wgray@leapmotion.com> | 2016-05-27 22:48:24 -0700 |
---|---|---|
committer | Walter Gray <wgray@leapmotion.com> | 2016-05-31 17:07:41 -0700 |
commit | f1091ab1aa4924b44d05af19ec6b9bbf9b557b7e (patch) | |
tree | 7feafccbecae660a90b78d263a891391edd47b38 | |
parent | c4611939cdf4d651c486d7caa04e7acbbcc4ccee (diff) | |
download | protobuf-f1091ab1aa4924b44d05af19ec6b9bbf9b557b7e.tar.gz protobuf-f1091ab1aa4924b44d05af19ec6b9bbf9b557b7e.tar.bz2 protobuf-f1091ab1aa4924b44d05af19ec6b9bbf9b557b7e.zip |
Include the prerelease version in the protobuf_VERSION
-rw-r--r-- | cmake/CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index f32a0e4e..67d433bc 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -44,17 +44,24 @@ string(REGEX REPLACE "${protobuf_AC_INIT_REGEX}" "\\2" string(REGEX REPLACE "${protobuf_AC_INIT_REGEX}" "\\3" protobuf_CONTACT "${protobuf_AC_INIT_LINE}") # Parse version tweaks -set(protobuf_VERSION_REGEX "^([0-9]+)\\.([0-9]+)\\.([0-9]+).*$") +set(protobuf_VERSION_REGEX "^([0-9]+)\\.([0-9]+)\\.([0-9]+)-?(.*)$") string(REGEX REPLACE "${protobuf_VERSION_REGEX}" "\\1" protobuf_VERSION_MAJOR "${protobuf_VERSION_STRING}") string(REGEX REPLACE "${protobuf_VERSION_REGEX}" "\\2" protobuf_VERSION_MINOR "${protobuf_VERSION_STRING}") string(REGEX REPLACE "${protobuf_VERSION_REGEX}" "\\3" protobuf_VERSION_PATCH "${protobuf_VERSION_STRING}") +string(REGEX REPLACE "${protobuf_VERSION_REGEX}" "\\4" + protobuf_VERSION_PRERELEASE "${protobuf_VERSION_STRING}") + # Package version set(protobuf_VERSION "${protobuf_VERSION_MAJOR}.${protobuf_VERSION_MINOR}.${protobuf_VERSION_PATCH}") +if(protobuf_VERSION_PRERELEASE) + set(protobuf_VERSION "${protobuf_VERSION}-${protobuf_VERSION_PRERELEASE}") +endif() + if(protobuf_VERBOSE) message(STATUS "Configuration script parsing status [") message(STATUS " Description : ${protobuf_DESCRIPTION}") |