diff options
author | Thomas White <taw@physics.org> | 2018-03-22 15:29:11 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-03-22 15:32:02 +0100 |
commit | 00e75c577fa1069d24188bb7750fea1bc3723865 (patch) | |
tree | 1f0e743caa26ad84b904c6b20f56becd0cf65bf7 | |
parent | bd5254b087bf38da5bd1aead7e32af508c0b12b4 (diff) |
Add proper version number
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | config.h.cmake.in | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 07ba6d4b..ce7a6e26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.6) -project(crystfel) +project(crystfel VERSION 0.6.3 LANGUAGES C) include(GNUInstallDirs) @@ -42,6 +42,7 @@ set(COMMON_LIBRARIES libcrystfel ${HDF5_C_LIBRARIES} Threads::Threads GSL::gsl) include(GetGitRevisionDescription) get_git_head_revision(GIT_REFSPEC GIT_SHA1) +string(SUBSTRING ${GIT_SHA1} 0 8 GIT_SHA1) include(CheckIncludeFile) include(CheckLibraryExists) @@ -58,6 +59,8 @@ set(HAVE_GDKPIXBUF ${GDKPIXBUF_FOUND}) set(HAVE_GDK ${GDK_FOUND}) set(HAVE_CURSES ${CURSES_FOUND}) +set(PACKAGE_VERSION ${PROJECT_VERSION}) + check_include_file(fcntl.h HAVE_FCNTL_H) check_include_file(stdlib.h HAVE_STDLIB_H) check_include_file(unistd.h HAVE_UNISTD_H) diff --git a/config.h.cmake.in b/config.h.cmake.in index d30e2485..2db30860 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -20,9 +20,9 @@ #cmakedefine HAVE_CBF_CBF_H #cmakedefine HAVE_CBFLIB_CBF_H -#define PACKAGE_VERSION "0.6.3" +#define PACKAGE_VERSION "${PROJECT_VERSION}" -#define CRYSTFEL_VERSIONSTRING "+@GIT_SHA1@" +#define CRYSTFEL_VERSIONSTRING "${PROJECT_VERSION}+${GIT_SHA1}" #define CRYSTFEL_BOILERPLATE "License GPLv3+: GNU GPL version 3 or later"\ " <http://gnu.org/licenses/gpl.html>.\n"\ |