mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-11-02 20:30:45 -06:00
file(COPY ) will only trigger when the destination file doesn't exist yet. It won't retrigger on source file changes. configure_file on the other hand will. To avoid unwanted substitution attempts this can be invoked with the COPYONLY keyword. Disadvantage of configure_file is that it will only take one input file where file(COPY ) can operate on a list of files. As such the configure_file statement has to be wrapped in a foreach. A few uses of file(COPY ) can't be replaced as they are setting file permissions. And the one in make_dist has been kept as that always operates on an empty directory, hence copying is guaranteed. The former will monitor the file for updates and copy it again the latter will only copy the file if it doesn't exist in the destination yet
17 lines
780 B
CMake
17 lines
780 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} )
|
|
configure_file(gnucash.1 ${DATADIR_BUILD}/gnucash/gnucash.1 COPYONLY)
|