mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 18:45:10 +01:00
Merge pull request #708 from saschazelzer/cmake-parse-version-string
Make regex compatible with VERSIONS like "1.6.0-all (2014-12-22)".
This commit is contained in:
commit
5f9a2cb6c3
@ -15,9 +15,9 @@ file(STRINGS "${CMAKE_SOURCE_DIR}/libversion" SHARED_LIBRARY_VERSION)
|
|||||||
# Read the version information from the VERSION file
|
# Read the version information from the VERSION file
|
||||||
file (STRINGS "${CMAKE_SOURCE_DIR}/VERSION" PACKAGE_VERSION )
|
file (STRINGS "${CMAKE_SOURCE_DIR}/VERSION" PACKAGE_VERSION )
|
||||||
message(STATUS "Poco package version: ${PACKAGE_VERSION}")
|
message(STATUS "Poco package version: ${PACKAGE_VERSION}")
|
||||||
string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" CPACK_PACKAGE_VERSION_MAJOR ${PACKAGE_VERSION})
|
string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" CPACK_PACKAGE_VERSION_MAJOR ${PACKAGE_VERSION})
|
||||||
string(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" CPACK_PACKAGE_VERSION_MINOR ${PACKAGE_VERSION})
|
string(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" CPACK_PACKAGE_VERSION_MINOR ${PACKAGE_VERSION})
|
||||||
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" CPACK_PACKAGE_VERSION_PATCH ${PACKAGE_VERSION})
|
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" CPACK_PACKAGE_VERSION_PATCH ${PACKAGE_VERSION})
|
||||||
|
|
||||||
set(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
set(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||||
set(RELEASE_NAME "Unstable-trunk")
|
set(RELEASE_NAME "Unstable-trunk")
|
||||||
|
Loading…
Reference in New Issue
Block a user