mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-23 01:44:35 +08:00
[cmake] fix TODAY macro
This commit is contained in:
parent
815d6a9fdd
commit
f72db3f9f7
@ -3,9 +3,12 @@
|
||||
# YYYY-MM-DD
|
||||
#
|
||||
MACRO (TODAY RESULT)
|
||||
if (DEFINED ENV{SOURCE_DATE_EPOCH} AND NOT WIN32)
|
||||
EXECUTE_PROCESS(COMMAND "date" "-u" "-d" "@$ENV{SOURCE_DATE_EPOCH}" "+%Y-%m-%d"
|
||||
OUTPUT_VARIABLE ${RESULT} OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
STRING(TIMESTAMP ${RESULT} "%Y-%m-%d" UTC)
|
||||
endif()
|
||||
if (DEFINED ENV{SOURCE_DATE_EPOCH} AND NOT WIN32)
|
||||
EXECUTE_PROCESS(COMMAND "date" "-u" "-d" "@$ENV{SOURCE_DATE_EPOCH}" "+%Y-%m-%d"
|
||||
OUTPUT_VARIABLE ${RESULT}
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
else()
|
||||
STRING(TIMESTAMP ${RESULT} "%Y-%m-%d" UTC)
|
||||
endif()
|
||||
ENDMACRO (TODAY)
|
||||
|
Loading…
Reference in New Issue
Block a user