mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-01-17 22:38:33 +01:00
24 lines
638 B
CMake
24 lines
638 B
CMake
find_program(DATE_EXECUTABLE NAMES date)
|
|
mark_as_advanced(DATE_EXECUTABLE)
|
|
|
|
if(DATE_EXECUTABLE)
|
|
execute_process(
|
|
COMMAND ${DATE_EXECUTABLE} +%Y
|
|
OUTPUT_VARIABLE CMAKE_DATESTAMP_YEAR
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
)
|
|
execute_process(
|
|
COMMAND ${DATE_EXECUTABLE} +%m
|
|
OUTPUT_VARIABLE CMAKE_DATESTAMP_MONTH
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
)
|
|
execute_process(
|
|
COMMAND ${DATE_EXECUTABLE} +%d
|
|
OUTPUT_VARIABLE CMAKE_DATESTAMP_DAY
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
)
|
|
endif()
|