Commit e41d1630 authored by Ralf Habacker's avatar Ralf Habacker
parent 692baa9d
......@@ -13,11 +13,6 @@ set (DBUS_VERSION ${DBUS_MAJOR_VERSION}.${DBUS_MINOR_VERSION}.${DBUS_MICRO_VERSI
set (DBUS_VERSION_STRING "${DBUS_VERSION}")
if (NOT DBUS_BUILD_TIMESTAMP)
message(STATUS "FIXME set DBUS_BUILD_TIMESTAMP to current date or fix current time stamp generation for having actual build date in version file info")
set (DBUS_BUILD_TIMESTAMP 20091231)
endif (NOT DBUS_BUILD_TIMESTAMP)
# we need to be up to date
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4 FATAL_ERROR)
if(COMMAND cmake_policy)
......@@ -27,6 +22,9 @@ endif(COMMAND cmake_policy)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
include(Macros)
TIMESTAMP(DBUS_BUILD_TIMESTAMP)
########### basic vars ###############
......
MACRO(TIMESTAMP RESULT)
IF(WIN32)
EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE DATE)
string(REGEX REPLACE "(..)[/.](..)[/.](....).*" "\\3\\2\\1" DATE ${DATE})
EXECUTE_PROCESS(COMMAND "cmd" " /C time /T" OUTPUT_VARIABLE TIME)
string(REGEX REPLACE "(..):(..)" "\\1\\2" TIME ${TIME})
set (${RESULT} "${DATE}${TIME}")
ELSEIF(UNIX)
EXECUTE_PROCESS(COMMAND "date" "+%Y%m%d%H%M" OUTPUT_VARIABLE ${RESULT})
ELSE()
MESSAGE(SEND_ERROR "date not implemented")
SET(${RESULT} 000000000000)
ENDIF()
ENDMACRO()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment