mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
* Fixed TWK-243: Show git revision in version number.
This commit is contained in:
23
CMakeModules/CMakeDateStamp.cmake
Normal file
23
CMakeModules/CMakeDateStamp.cmake
Normal file
@@ -0,0 +1,23 @@
|
||||
find_program(DATE_EXECUTABLE NAMES date)
|
||||
mark_as_advanced(DATE_EXECUTABLE)
|
||||
|
||||
if(GIT_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()
|
@@ -1,21 +0,0 @@
|
||||
# Do not edit! Generated by kwsysDateStamp.py
|
||||
#=============================================================================
|
||||
# KWSys - Kitware System Library
|
||||
# Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# KWSys version date year component. Format is CCYY.
|
||||
SET(KWSYS_DATE_STAMP_YEAR 2011)
|
||||
|
||||
# KWSys version date month component. Format is MM.
|
||||
SET(KWSYS_DATE_STAMP_MONTH 07)
|
||||
|
||||
# KWSys version date day component. Format is DD.
|
||||
SET(KWSYS_DATE_STAMP_DAY 06)
|
Reference in New Issue
Block a user