From 8b3c6f6bcd1a472fdb8b2c95e65366f2c0ccabb4 Mon Sep 17 00:00:00 2001 From: Andrey Vukolov Date: Thu, 14 Jul 2022 18:18:40 +0200 Subject: [PATCH] Version 0.3.1-alpha - Alpha version - release preparation - Version string bump - Involved autosubstitution on version.h - Completed release of standalone controller for WT31N - Preparation to generate installation scenario --- .gitignore | 2 ++ CMakeLists.txt | 10 +++++++++- config/version.h.in | 9 +++++++++ include/witmotion/types.h | 2 ++ version | 2 +- 5 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 config/version.h.in diff --git a/.gitignore b/.gitignore index 6b293c2..5158d27 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ .idea __pycache__ .cmake/ +include/witmotion/version.h + diff --git a/CMakeLists.txt b/CMakeLists.txt index 90af18b..0bdc9a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.1) project(witmotion-uart-qt) + +# VERSIONING execute_process(COMMAND git rev-parse --short HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE COMMIT_ID @@ -12,13 +14,19 @@ else(CMAKE_BUILD_TYPE STREQUAL "Release") set(PROJECT_VERSION "${PROJECT_VERSION}~dev_${COMMIT_ID}") endif(CMAKE_BUILD_TYPE STREQUAL "Release") message(STATUS "Building version ${PROJECT_VERSION}") +configure_file(config/version.h.in + ${CMAKE_CURRENT_SOURCE_DIR}/include/witmotion/version.h + ) + set (CMAKE_CXX_STANDARD 14) include(CheckIncludeFile) check_include_file("inttypes.h" HAVE_INTTYPES_H) if(NOT HAVE_INTTYPES_H) message(FATAL_ERROR "\'inttypes.h\' include file required!. Please check your toolchain!") endif(NOT HAVE_INTTYPES_H) -include_directories(include) +include_directories(include + ${CMAKE_CURRENT_BINARY_DIR} + ) find_package(Qt5 REQUIRED COMPONENTS Core SerialPort) set(CMAKE_AUTOMOC ON) diff --git a/config/version.h.in b/config/version.h.in new file mode 100644 index 0000000..535c8a6 --- /dev/null +++ b/config/version.h.in @@ -0,0 +1,9 @@ +namespace witmotion +{ + +static const std::string library_version() +{ + return "${PROJECT_VERSION}"; +} + +} diff --git a/include/witmotion/types.h b/include/witmotion/types.h index d47cce8..1d72eb8 100644 --- a/include/witmotion/types.h +++ b/include/witmotion/types.h @@ -7,6 +7,8 @@ #include #include +#include "witmotion/version.h" + /*! \file types.h \brief Abstract types collection for Witmotion sensor library diff --git a/version b/version index 0c62199..bcea87e 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.2.1 +0.3.1-alpha