gnucash/data/checks/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

18 lines
416 B
CMake

set(checks_DATA
deluxe.chk
liberty.chk
quicken.chk
quicken_wallet.chk
voucher.chk
quicken_check_21.chk
quicken_3part.chk
)
install(FILES ${checks_DATA} DESTINATION ${CMAKE_INSTALL_DATADIR}/gnucash/checks)
foreach(check_file ${checks_DATA})
configure_file(${check_file} ${DATADIR_BUILD}/gnucash/checks/${check_file} COPYONLY)
endforeach()
set_dist_list(checks_DIST CMakeLists.txt ${checks_DATA})