From aab383a63e994f40ddf8d8341b8b75c19e6c1a0f Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Mon, 14 Dec 2009 23:31:38 +0100 Subject: [PATCH] added new variable DBUS_BUILD_TIMESTAMP --- cmake/CMakeLists.txt | 9 +++++++++ cmake/dbus/CMakeLists.txt | 7 ++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index e623e2d..d0a290c 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -10,6 +10,11 @@ endif (DBUS_PATCH_VERSION) 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) @@ -593,6 +598,10 @@ message(" Console auth dir: ${DBUS_CONSOLE_AUTH_DIR} " message(" System bus user: ${DBUS_USER} ") message(" 'make check' socket dir: ${TEST_SOCKET_DIR} ") endif (WIN32) +if (MSVC) +message(" build timestamp: ${DBUS_BUILD_TIMESTAMP} ") +endif (MSVC) + MESSAGE(" ") if (DBUS_BUILD_TESTS) message("NOTE: building with unit tests increases the size of the installed library and renders it insecure.") diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt index d840493..ff0d493 100644 --- a/cmake/dbus/CMakeLists.txt +++ b/cmake/dbus/CMakeLists.txt @@ -230,11 +230,8 @@ set(libdbus_HEADERS ) if (MSVC) set (BUILD_FILEVERSION ${DBUS_MAJOR_VERSION},${DBUS_MINOR_VERSION},${DBUS_MICRO_VERSION},${DBUS_PATCH_VERSION}) - - # no idea how to create the current date as string - message(STATUS "FIXME create the current date as string in dbus/CMakeLists.txt") - set (BUILD_TIMESTAMP 20091205) - + set (BUILD_TIMESTAMP ${DBUS_BUILD_TIMESTAMP}) + configure_file(${DBUS_DIR}/versioninfo.rc.in ${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc) file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/afxres.h "") list(APPEND libdbus_SOURCES versioninfo.rc) -- 2.7.4