From dbd170d863498df6dbb97ca1d867d9652b8e810d Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Mon, 28 Jan 2013 20:05:34 +0100 Subject: [PATCH] Fixed cmake cross compile timestamp creating. https://bugs.freedesktop.org/show_bug.cgi?id=59733 --- cmake/modules/Macros.cmake | 4 ++-- 1 Datei geändert, 2 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-) diff --git a/cmake/modules/Macros.cmake b/cmake/modules/Macros.cmake index b637156..3fcc40e 100644 --- a/cmake/modules/Macros.cmake +++ b/cmake/modules/Macros.cmake @@ -1,12 +1,12 @@ MACRO(TIMESTAMP RESULT) - IF(WIN32) + IF(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") 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) + ELSEIF(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") EXECUTE_PROCESS(COMMAND "date" "+%Y%m%d%H%M" OUTPUT_VARIABLE ${RESULT}) ELSE() MESSAGE(SEND_ERROR "date not implemented") -- 1.7.10.4