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 9 )
22 set( ${PROJECT_NAME}_PATCH_LEVEL 6 )
24 set(VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL})
26 if(NOT DEFINED ILM_VERSION)
28 execute_process(COMMAND git describe --tags WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
29 RESULT_VARIABLE RESULT_VAR
30 OUTPUT_VARIABLE ILM_VERSION
31 OUTPUT_STRIP_TRAILING_WHITESPACE
34 if(NOT "${RESULT_VAR}" STREQUAL 0)
36 message(STATUS "Unable launch automatic version build! Using default version!")
37 set(ILM_VERSION ${VERSION})
39 else(NOT "${RESULT_VAR}" STREQUAL 0)
41 string(REPLACE "-" "_" ILM_VERSION ${ILM_VERSION})
43 endif(NOT "${RESULT_VAR}" STREQUAL 0)
45 endif(NOT DEFINED ILM_VERSION)
47 set(LICENSE "APACHE 2.0")
49 set(GENIVI_PROJECT_VERSION ${VERSION})
51 "Build for Version ${VERSION} build ${ILM_VERSION}"
54 ##################### RPM CONFIG ########################
55 set(GENIVI_RPM_RELEASE "${ILM_VERSION}")
57 #########################################################