gnucash/data/accounts/fr_CA/CMakeLists.txt
Geert Janssens 0cfb40efeb CMake - use configure_file instead of file(COPY ) wherever possible
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
2020-04-19 21:23:22 +02:00

24 lines
746 B
CMake

set(account_DATA
acctchrt_actifsfixes.gnucash-xea
acctchrt_automobile.gnucash-xea
acctchrt_basecommune.gnucash-xea
acctchrt_cdmarchemon.gnucash-xea
acctchrt_chequier.gnucash-xea
acctchrt_conjointretraite.gnucash-xea
acctchrt_conjointrev.gnucash-xea
acctchrt_courtage.gnucash-xea
acctchrt_etudeemprunt.gnucash-xea
acctchrt_garderie.gnucash-xea
acctchrt_locataire.gnucash-xea
acctchrt_proprietaire.gnucash-xea
acctchrt_retraite.gnucash-xea
acctchrt_revenus.gnucash-xea)
set_dist_list(FR_CA_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/fr_CA)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/fr_CA/${acct_file} COPYONLY)
endforeach()