Skip to content
Snippets Groups Projects
Commit 99a9f1c0 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

added cmake script to set the version number cmake variables as needed by...

added cmake script to set the version number cmake variables as needed by other scripts of the project-template
parent 0d5c990e
No related branches found
No related tags found
No related merge requests found
#######################################################################################################################
# set_version_numbers.cmake
#
# Set the version numbers for a package in the format needed by other scripts of the project-template
#
# Expects the following input variables:
# ${PROJECT_NAME}_MAJOR_VERSION - major version number
# ${PROJECT_NAME}_MINOR_VERSION - minor version number
# ${PROJECT_NAME}_PATCH_VERSION - patch number
#
# Optional environment variables:
# $PROJECT_BUILDVERSION - additional build version number for the shared object version number (e.g. "xenial1")
#
#######################################################################################################################
#######################################################################################################################
#
# IMPORTANT NOTE:
#
# DO NOT MODIFY THIS FILE inside a project. Instead update the project-template repository and pull the change from
# there. Make sure to keep the file generic, since it will be used by other projects, too.
#
# If you have modified this file inside a project despite this warning, make sure to cherry-pick all your changes
# into the project-template repository immediately.
#
#######################################################################################################################
set(${PROJECT_NAME}_VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_VERSION})
set(${PROJECT_NAME}_SOVERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION})
set(${PROJECT_NAME}_BUILDVERSION $ENV{PROJECT_BUILDVERSION})
if( ${PROJECT_NAME}_BUILDVERSION )
set(${PROJECT_NAME}_SOVERSION "${${PROJECT_NAME}_SOVERSION}${${PROJECT_NAME}_BUILDVERSION}")
endif( ${PROJECT_NAME}_BUILDVERSION )
set(${PROJECT_NAME}_FULL_LIBRARY_VERSION ${${PROJECT_NAME}_SOVERSION}.${${PROJECT_NAME}_PATCH_VERSION})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment