mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-09-01 01:51:58 +02:00
Add date and git revision to non-release package names
This commit is contained in:
37
CMakeModules/CMakeVersionSource.cmake
Normal file
37
CMakeModules/CMakeVersionSource.cmake
Normal file
@@ -0,0 +1,37 @@
|
||||
# Try to identify the current development source version.
|
||||
set(CMAKE_VERSION_SOURCE "")
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/.git/HEAD)
|
||||
find_program(GIT_EXECUTABLE NAMES git git.cmd)
|
||||
mark_as_advanced(GIT_EXECUTABLE)
|
||||
if(GIT_EXECUTABLE)
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-parse --verify -q --short=4 HEAD
|
||||
OUTPUT_VARIABLE head
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
if(head)
|
||||
set(CMAKE_VERSION_SOURCE "g${head}")
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} update-index -q --refresh
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} diff-index --name-only HEAD --
|
||||
OUTPUT_VARIABLE dirty
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
if(dirty)
|
||||
set(CMAKE_VERSION_SOURCE "${CMAKE_VERSION_SOURCE}-dirty")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
elseif(EXISTS ${CMAKE_SOURCE_DIR}/CVS/Repository)
|
||||
file(READ ${CMAKE_SOURCE_DIR}/CVS/Repository repo)
|
||||
set(branch "")
|
||||
if("${repo}" MATCHES "\\.git/")
|
||||
string(REGEX REPLACE ".*\\.git/([^\r\n]*).*" "-\\1" branch "${repo}")
|
||||
endif()
|
||||
set(CMAKE_VERSION_SOURCE "cvs${branch}")
|
||||
endif()
|
21
CMakeModules/kwsysDateStamp.cmake
Normal file
21
CMakeModules/kwsysDateStamp.cmake
Normal file
@@ -0,0 +1,21 @@
|
||||
# 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