2020-08-25 16:05:56 +02:00
|
|
|
# === This file is part of Calamares - <https://calamares.io> ===
|
2020-08-26 00:24:40 +02:00
|
|
|
#
|
|
|
|
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
|
|
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
#
|
|
|
|
###
|
|
|
|
#
|
|
|
|
# Find today's date, for versioning purposes.
|
2014-06-04 16:35:26 +02:00
|
|
|
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()
|