From a8bc07c8322e7641d3e07cc68767233460abfda4 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 8 Jan 2014 08:47:39 -0600 Subject: [PATCH] Add KICAD_REPO_NAME to the about dialog and build_version.cpp --- CMakeLists.txt | 4 ++++ CMakeModules/config.h.cmake | 12 +++++++----- common/build_version.cpp | 3 ++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d4e28f413..908a60c39c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,10 @@ mark_as_advanced( KICAD_SKIP_BOOST ) # Normal builders should build Boost. option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." OFF ) +# This can be set to a custom name to brag about a particular branch in the "About" dialog: +set( KICAD_REPO_NAME "product" CACHE STRING "Name of the tree from which this build came." ) + + # All CMake downloads go here. Suggested is up in the source tree, not in the build dir where they # would have to be downloaded over and over again. The default is to choose a directory that is # hidden on linux (starts with a '.') because there is a way to exclude this directory when grepping diff --git a/CMakeModules/config.h.cmake b/CMakeModules/config.h.cmake index dc30b0a2ad..00ae9a6bd1 100644 --- a/CMakeModules/config.h.cmake +++ b/CMakeModules/config.h.cmake @@ -51,21 +51,23 @@ #cmakedefine HAVE_FGETC_NOLOCK // Warning!!! Using wxGraphicContext for rendering is experimental. -#cmakedefine USE_WX_GRAPHICS_CONTEXT 1 +#cmakedefine USE_WX_GRAPHICS_CONTEXT 1 -#cmakedefine USE_IMAGES_IN_MENUS 1 +#cmakedefine USE_IMAGES_IN_MENUS 1 /// The legacy file format revision of the *.brd file created by this build -#define LEGACY_BOARD_FILE_VERSION 2 +#define LEGACY_BOARD_FILE_VERSION 2 /// The install prefix defined in CMAKE_INSTALL_PREFIX. -#define DEFAULT_INSTALL_PATH "@CMAKE_INSTALL_PREFIX" +#define DEFAULT_INSTALL_PATH "@CMAKE_INSTALL_PREFIX@" /// Default footprint library install path when installed with `make install`. -#define DEFAULT_FP_LIB_PATH "@KICAD_FP_LIB_INSTALL_PATH@" +#define DEFAULT_FP_LIB_PATH "@KICAD_FP_LIB_INSTALL_PATH@" /// When defined, build the GITHUB_PLUGIN for pcbnew. #cmakedefine BUILD_GITHUB_PLUGIN +/// Name of repo from which this build came. +#define KICAD_REPO_NAME "@KICAD_REPO_NAME@" #endif // CONFIG_H_ diff --git a/common/build_version.cpp b/common/build_version.cpp index a1f4fe7d7e..14f436e304 100644 --- a/common/build_version.cpp +++ b/common/build_version.cpp @@ -17,7 +17,8 @@ wxString GetBuildVersion() { wxString msg = wxString::Format( wxT( "%s-%s" ), - wxT( KICAD_BUILD_VERSION ) + wxT( KICAD_BUILD_VERSION ), + wxT( KICAD_REPO_NAME ) ); return msg;