mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-27 12:16:34 +00:00
CMake: remove tailing newline from date under Windows
This patch prevents from having a newline (\n) within date result in generated RC file
This commit is contained in:
committed by
Romuald Conty
parent
0ee6dcad4b
commit
76a85ce84b
@@ -139,6 +139,7 @@ IF(WIN32)
|
||||
# Date for filling in rc file information
|
||||
MACRO (GET_CURRENT_YEAR RESULT)
|
||||
EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT})
|
||||
STRING(REGEX REPLACE "\n" "" ${RESULT} ${${RESULT}})
|
||||
STRING(REGEX REPLACE ".*(..)/(..)/(....).*" "\\3" ${RESULT} ${${RESULT}})
|
||||
ENDMACRO (GET_CURRENT_YEAR)
|
||||
GET_CURRENT_YEAR(CURRENT_YEAR)
|
||||
|
||||
Reference in New Issue
Block a user