gnucash/cmake/configure-manpage.cmake
Geert Janssens c4a21bc9d4 Extract a few cmake commands to dedicated files rather than generating them on the fly
This simplifies a number of escape sequences.

The generated file to configure the man page was split up a bit further:
- code that extracted the GNC_VCS_REV_Y_M from gnc-vcs-info.h was spun out
  into its own function that now sets all parameters in gnc-vcs-info.h
  as environment variables.
- this function is now invoked by configure-manpage.cmake to extract
  the date to insert into the manpage.
- the manpage in addition now shows the full date rather than only
  yyyy-mm. This is how man itself does it as well.
2019-08-24 17:05:03 +02:00

18 lines
768 B
CMake

# Command to configure the gnucash man page
# These commands are store in a separate cmake file as they have to be
# rerun depending on build conditions, not depending on cmake conditions
# (such as did the version string change or not)
#
# The following environment variables are used and should be properly set
# by the calling code:
# - SRC_DIR (top level source code directory)
# - SRC (full path to gnc-vcs-info.h.in)
# - DST (full path to destination for gnc-vcs-info.h)
# - VCS_INFO_FILE (full path to gnc-vcs-info.h - can be in source tree (release builds) or build tree (git builds))
include (${SRC_DIR}/cmake/version-info2env.cmake)
versioninfo2env (${VCS_INFO_FILE})
configure_file(${SRC} ${DST} )
file(COPY gnucash.1
DESTINATION ${DATADIR_BUILD}/gnucash)