allow build version to be set, while preserving program version

useful for creating a config.h via an extraction script that creates a source tar bundle
This commit is contained in:
raburton 2008-08-29 14:06:19 +00:00
parent 6d51d2ae30
commit 46f931b6ae
3 changed files with 11 additions and 1 deletions

View File

@ -117,6 +117,14 @@ if(UNIX)
create_svn_version_header()
endif(UNIX)
if(EXISTS ${CMAKE_SOURCE_DIR}/include/config.h)
# This file may exist (created by an alternate process to the svn test above),
# e.g. could be created by a checkout script that produces a source tar file.
# This directive means the about box will have the svn date & revision in it,
# but the hard coded release date (program version) will be preserved.
add_definitions(-DHAVE_SVN_REVISION)
endif(EXISTS ${CMAKE_SOURCE_DIR}/include/config.h)
# Include paths.
include_directories(${CMAKE_SOURCE_DIR}/include

View File

@ -14,6 +14,8 @@ macro(create_svn_version_header)
# Subversion info command instead of hand coded date and revision in
# "include/build_version.h". If subversion is not found then the date
# and version information must be manually edited.
# Directive means SVN build, program version and build version will
# reflect this.
add_definitions(-DHAVE_SVN_VERSION)
# Generate config.h.

View File

@ -16,7 +16,7 @@ COMMON_GLOBL wxString g_BuildVersion
COMMON_GLOBL wxString g_BuildAboutVersion
#ifdef EDA_BASE
# ifdef HAVE_SVN_VERSION
# if defined(HAVE_SVN_VERSION) || defined(HAVE_SVN_REVISION)
# include "config.h"
(wxT(KICAD_ABOUT_VERSION))
# else