2020-02-17 07:13:18 -06:00
|
|
|
# Command to configure the gnucash desktop file
|
2019-08-24 09:32:56 -05:00
|
|
|
# These commands are stored 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)
|
2020-02-17 07:13:18 -06:00
|
|
|
# - SRC (full path to gnucash.desktop.in)
|
|
|
|
# - DST (full path to destination for gnucash.desktop)
|
2019-08-24 09:32:56 -05:00
|
|
|
# - VCS_INFO_FILE (full path to gnc-vcs-info.h - can be in source tree (release builds) or build tree (git builds))
|
2020-02-17 07:13:18 -06:00
|
|
|
# - DATADIR_BUILD (path to application data directory, typically {CMAKE_BINARY_DIR}/share)
|
2019-08-24 09:32:56 -05:00
|
|
|
|
|
|
|
include (${SRC_DIR}/cmake/version-info2env.cmake)
|
|
|
|
versioninfo2env (${VCS_INFO_FILE})
|
2020-02-16 13:02:33 -06:00
|
|
|
|
|
|
|
|
|
|
|
if (GNUCASH_BUILD_ID AND NOT "${GNUCASH_BUILD_ID}" STREQUAL "${GNC_VCS_REV}")
|
|
|
|
set (GNC_VCS_REV "${GNC_VCS_REV} (${GNUCASH_BUILD_ID})")
|
|
|
|
endif()
|
2020-02-08 04:44:40 -06:00
|
|
|
configure_file(${SRC} ${DST})
|