Source

gazebo / cmake / DissectVersion.cmake

Full commit
1
2
3
4
5
# Find version components
STRING (REGEX REPLACE "^([0-9]+).*" "\\1" GAZEBO_MAJOR_VERSION "${GAZEBO_VERSION_FULL}")
STRING (REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" GAZEBO_MINOR_VERSION "${GAZEBO_VERSION_FULL}")
STRING (REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" GAZEBO_REVISION_VERSION ${GAZEBO_VERSION_FULL})
STRING (REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+(.*)" "\\1" GAZEBO_CANDIDATE_VERSION ${GAZEBO_VERSION_FULL})