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)
# 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 ###############
--- /dev/null
+
+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()