Commit 46f931b6 authored by raburton's avatar raburton

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
parent 6d51d2ae
......@@ -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
......
......@@ -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.
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment