Minor tweaks to appdata file generation

* Use cmake's built-in copy command rather than an external one
* depend directly on gnc-vcs-info.h rather than the global gnc-vcs-info-target
  The latter won't trigger a rerun of the command if gnc-vcs-info.h already exists
  regardless of whether it had changed.
This commit is contained in:
Geert Janssens 2019-08-26 09:24:19 +02:00
parent 4de2e2b9c2
commit 8c2f5fb7a2

View File

@ -166,11 +166,11 @@ if (${GETTEXT_VERSION_STRING} VERSION_LESS 0.19.6)
# Fall back to providing an unmerged (and hence untranslated) appdata file.
add_custom_command (
OUTPUT gnucash.appdata.xml
COMMAND ${CMAKE_COMMAND} -E env
cp ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in
${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in
${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in gnc-vcs-info
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in ${VCS_INFO_FILE}
)
else()
# FIXME: where does LC_ALL=C come from?
@ -182,7 +182,7 @@ else()
--xml --template ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in
-d ${CMAKE_SOURCE_DIR}/po
-o gnucash.appdata.xml
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in gnc-vcs-info
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in ${VCS_INFO_FILE}
)
endif()