SET( ${PROJECT_NAME}_MAJOR_VERSION 0 )
SET( ${PROJECT_NAME}_MINOR_VERSION 9 )
SET( ${PROJECT_NAME}_PATCH_LEVEL 1 )
-set(VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL})
+SET(VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL})
+if(NOT DEFINED ILM_VERSION)
+execute_process(COMMAND git describe --tags WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ OUTPUT_VARIABLE ILM_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+endif(NOT DEFINED ILM_VERSION)
+
set(LICENSE "APACHE 2.0")
set(GENIVI_PROJECT_VERSION ${VERSION})
+message(STATUS
+ "Build for Version ${VERSION} build ${ILM_VERSION}"
+ )
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DILM_VERSION='\"${ILM_VERSION}\"' " CACHE STRING "" FORCE)
##################### RPM CONFIG ########################
-set(GENIVI_RPM_RELEASE "1${SVN_REVISION}")
+set(GENIVI_RPM_RELEASE "1${ILM_VERSION}")
set(SPEC_DIR ".")
#########################################################
option (WITH_FORCE_COPY
"Force Software Copy of Pixmaps" OFF)
-
+
if (WITH_XTHREADS)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_XTHREADS" CACHE STRING "" FORCE)
endif(WITH_XTHREADS)
"\t-d: displayName \t\n"
"\t-f: loglevel file \t 0 [default] \n\t\t\t\t[0=disabled,1=error,2=info,3=warning,4=debug]\n"
"\t-c: loglevel console \t 2 [default] \n\t\t\t\t[0=disabled,1=error,2=info,3=warning,4=debug]\n"
+ "\t-v: show version info\t\n"
"\nexample: LayerManagerService -w800 -h480 -d:0\n";
+const char* VERSION_STRING = ILM_VERSION;
template<class T>
T* getCreateFunction(string libname)
{
{
while (optind < argc)
{
- int option = getopt(argc, argv, "w::h::d::?::c::f::");
+ int option = getopt(argc, argv, "w::h::d::?::c::f::v::");
switch (option)
{
case 'd':
Log::fileLogLevel = (LOG_MODES) atoi(optarg);
}
break;
+ case 'v':
+ printf("LayerManagerService\nVersion: %s\n",VERSION_STRING);
+ exit(-1);
+ break;
case '?':
default:
+ printf("LayerManagerService\nVersion: %s\n",VERSION_STRING);
puts(USAGE_DESCRIPTION);
exit(-1);
}