Skip to content

Commit

Permalink
Fill in version number in man page from VERSION file
Browse files Browse the repository at this point in the history
  • Loading branch information
dscharrer committed Jun 12, 2018
1 parent 0762d3d commit 5d4b73e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,15 @@ configure_file("src/configure.hpp.in" "configure.hpp")

set(VERSION_FILE "${PROJECT_BINARY_DIR}/release.cpp")
set(VERSION_SOURCES VERSION "VERSION" LICENSE "LICENSE")
version_file("src/release.cpp.in" "${VERSION_FILE}" "${VERSION_SOURCES}" ".git")
version_file("src/release.cpp.in" ${VERSION_FILE} "${VERSION_SOURCES}" ".git")
list(APPEND INNOEXTRACT_SOURCES ${VERSION_FILE})

set(MAN_INPUT "doc/innoextract.1.in")
set(MAN_FILE "${PROJECT_BINARY_DIR}/innoextract.1")
set(MAN_SOURCES VERSION "VERSION" CHANGELOG "CHANGELOG")
version_file(${MAN_INPUT} ${MAN_FILE} "${MAN_SOURCES}" ".git")
add_custom_target(manpage ALL DEPENDS ${MAN_FILE})


# Main targets

Expand All @@ -432,7 +438,7 @@ target_link_libraries(innoextract ${LIBRARIES})

install(TARGETS innoextract RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

install(FILES doc/innoextract.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 OPTIONAL)
install(FILES ${MAN_FILE} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 OPTIONAL)


# Additional targets.
Expand Down
2 changes: 1 addition & 1 deletion doc/innoextract.1.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" Manpage for innoextract.
.\" Contact [email protected] to correct errors or typos.
.TH innoextract 1 "2016-03-02" "1.7-dev"
.TH innoextract 1 "@CHANGELOG_0_NUMBER@" "@VERSION_0_NUMBER@@GIT_SUFFIX_7@"
.SH NAME
innoextract - tool to extract installers created by Inno Setup
.SH SYNOPSIS
Expand Down

0 comments on commit 5d4b73e

Please sign in to comment.