1 ############################################################################
3 # Copyright 2010, 2011 BMW Car IT GmbH
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 ############################################################################
20 set( ${PROJECT_NAME}_MAJOR_VERSION 0 )
21 set( ${PROJECT_NAME}_MINOR_VERSION 1 )
22 set( ${PROJECT_NAME}_PATCH_LEVEL 2 )
23 set( ${PROJECT_NAME}_RELEASE release )
25 set(VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL}.${${PROJECT_NAME}_RELEASE})
27 if(NOT DEFINED ILM_VERSION)
29 execute_process(COMMAND git describe --tags WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
30 RESULT_VARIABLE RESULT_VAR
31 OUTPUT_VARIABLE ILM_VERSION
32 OUTPUT_STRIP_TRAILING_WHITESPACE
35 if(NOT "${RESULT_VAR}" STREQUAL 0)
37 message(STATUS "Unable launch automatic version build! Using default version!")
38 set(ILM_VERSION ${VERSION})
40 else(NOT "${RESULT_VAR}" STREQUAL 0)
42 string(REPLACE "-" "_" ILM_VERSION ${ILM_VERSION})
44 endif(NOT "${RESULT_VAR}" STREQUAL 0)
46 endif(NOT DEFINED ILM_VERSION)
48 set(LICENSE "APACHE 2.0")
50 set(GENIVI_PROJECT_VERSION ${VERSION})
52 "Build for Version ${VERSION} build ${ILM_VERSION}"
55 ##################### RPM CONFIG ########################
56 set(GENIVI_RPM_RELEASE "${ILM_VERSION}")
58 #########################################################