Skip to content

Commit

Permalink
Merge pull request #263 from louisrubet/develop
Browse files Browse the repository at this point in the history
v2.4.2
  • Loading branch information
louisrubet authored Mar 3, 2022
2 parents d416db3 + d705cf2 commit cd16651
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.4.2] - 2022-03-03

### Fixed

- Version string were not correctly shown using flatpak generation

## [2.4.1] - 2022-03-02

### Added
Expand Down
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ endif()

message(STATUS "Build mode: ${CMAKE_BUILD_TYPE}")

if(EXISTS "${PROJECT_SOURCE_DIR}/.git")
execute_process(COMMAND git describe HEAD OUTPUT_VARIABLE "GIT_VERSION" OUTPUT_STRIP_TRAILING_WHITESPACE)
add_definitions(-DGIT_VERSION="${GIT_VERSION}")
else(EXISTS ${PROJECT_SOURCE_DIR}/.git)
set(GIT_VERSION "unknown")
if(NOT DEFINED RPN_VERSION)
if(EXISTS "${PROJECT_SOURCE_DIR}/.git")
execute_process(COMMAND git describe HEAD OUTPUT_VARIABLE "RPN_VERSION" OUTPUT_STRIP_TRAILING_WHITESPACE)
else(EXISTS ${PROJECT_SOURCE_DIR}/.git)
set(VERSION "unknown")
endif()
add_definitions(-DGIT_VERSION="${RPN_VERSION}")
endif()
add_definitions(-DGIT_VERSION="${GIT_VERSION}")
message("GIT_VERSION is ${GIT_VERSION}")
message("RPN_VERSION is ${RPN_VERSION}")
add_definitions(-DRPN_VERSION="${RPN_VERSION}")

# INFO
set(RPN_DISPLAY_NAME "rpn")
Expand Down
4 changes: 3 additions & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#ifndef SRC_VERSION_H_
#define SRC_VERSION_H_

#define RPN_VERSION GIT_VERSION // set by cmake from git tag
#ifndef RPN_VERSION
#define RPN_VERSION "dev version" // set by cmake from git tag
#endif

#endif // SRC_VERSION_H_

0 comments on commit cd16651

Please sign in to comment.