Skip to content

Commit

Permalink
Version number can be set as a cmake property.
Browse files Browse the repository at this point in the history
It is usually gleaned from the git history, but this makes it settable
outside of a repository (e.g. in someone elses CI build)
  • Loading branch information
KazDragon committed Apr 27, 2022
1 parent bfe3425 commit 6f2e144
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ message("Building Terminal++ with only documentation: ${TERMINALPP_DOC_ONLY}")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")

include(function-git_version)
git_version(TERMINALPP)
# If the version is not passed in, then determine it from git history.
if (NOT TERMINALPP_VERSION)
include(function-git_version)
git_version(TERMINALPP)
endif()

message(STATUS "Terminal++ Version: ${TERMINALPP_VERSION}")
project(TERMINALPP VERSION ${TERMINALPP_VERSION})

Expand Down

0 comments on commit 6f2e144

Please sign in to comment.