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
This commit is contained in:
Geert Janssens 2020-04-19 19:33:07 +02:00
parent 261bff1250
commit 0cfb40efeb
49 changed files with 174 additions and 55 deletions

View File

@ -102,7 +102,9 @@ if(WITH_PYTHON)
DESTINATION ${PYTHON_SYSCONFIG_OUTPUT}/gnucash DESTINATION ${PYTHON_SYSCONFIG_OUTPUT}/gnucash
) )
file(COPY ${PYEXEC_FILES} DESTINATION ${PYTHON_SYSCONFIG_BUILD}/gnucash) foreach(PYEXEC_FILE ${PYEXEC_FILES})
configure_file(${PYEXEC_FILE} ${PYTHON_SYSCONFIG_BUILD}/gnucash/${PYEXEC_FILE} COPYONLY)
endforeach()
add_custom_target(gnucash-core-c-py ALL add_custom_target(gnucash-core-c-py ALL
COMMAND ${CMAKE_COMMAND} -E copy ${SWIG_GNUCASH_CORE_PY} ${PYTHON_SYSCONFIG_BUILD}/gnucash COMMAND ${CMAKE_COMMAND} -E copy ${SWIG_GNUCASH_CORE_PY} ${PYTHON_SYSCONFIG_BUILD}/gnucash

View File

@ -13,5 +13,4 @@
include (${SRC_DIR}/cmake/version-info2env.cmake) include (${SRC_DIR}/cmake/version-info2env.cmake)
versioninfo2env (${VCS_INFO_FILE}) versioninfo2env (${VCS_INFO_FILE})
configure_file(${SRC} ${DST} ) configure_file(${SRC} ${DST} )
file(COPY gnucash.1 configure_file(gnucash.1 ${DATADIR_BUILD}/gnucash/gnucash.1 COPYONLY)
DESTINATION ${DATADIR_BUILD}/gnucash)

View File

@ -21,5 +21,7 @@ set(account_DATA
set_dist_list(C_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt) set_dist_list(C_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/C) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/C)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/C)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/C/${acct_file} COPYONLY)
endforeach()

View File

@ -18,4 +18,7 @@ set(account_DATA
set_dist_list(CA_DIST ${account_DATA} CMakeLists.txt) set_dist_list(CA_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/ca) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/ca)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/ca)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/ca/${acct_file} COPYONLY)
endforeach()

View File

@ -18,4 +18,7 @@ set(account_DATA
set_dist_list(CS_DIST ${account_DATA} CMakeLists.txt) set_dist_list(CS_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/cs) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/cs)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/cs)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/cs/${acct_file} COPYONLY)
endforeach()

View File

@ -7,4 +7,7 @@ set(account_DATA
set_dist_list(DA_DIST ${account_DATA} CMakeLists.txt) set_dist_list(DA_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/da) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/da)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/da)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/da/${acct_file} COPYONLY)
endforeach()

View File

@ -13,4 +13,7 @@ set(dist_account_DATA
set_dist_list(DE_AT_DIST ${dist_account_DATA} CMakeLists.txt) set_dist_list(DE_AT_DIST ${dist_account_DATA} CMakeLists.txt)
install(FILES ${dist_account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/de_AT) install(FILES ${dist_account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/de_AT)
file(COPY ${dist_account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/de_AT)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/de_AT/${acct_file} COPYONLY)
endforeach()

View File

@ -9,4 +9,7 @@ set(account_DATA
set_dist_list(DE_CH_DIST ${account_DATA} CMakeLists.txt) set_dist_list(DE_CH_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/de_CH) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/de_CH)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/de_CH)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/de_CH/${acct_file} COPYONLY)
endforeach()

View File

@ -17,4 +17,7 @@ set(account_DATA
set_dist_list(DE_DE_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt) set_dist_list(DE_DE_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/de_DE) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/de_DE)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/de_DE)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/de_DE/${acct_file} COPYONLY)
endforeach()

View File

@ -6,4 +6,7 @@ set(account_DATA
set_dist_list(EL_GR_DIST ${account_DATA} CMakeLists.txt) set_dist_list(EL_GR_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/el_GR) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/el_GR)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/el_GR)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/el_GR/${acct_file} COPYONLY)
endforeach()

View File

@ -20,4 +20,7 @@ set(account_DATA
set_dist_list(EN_GB_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt) set_dist_list(EN_GB_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/en_GB) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/en_GB)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/en_GB)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/en_GB/${acct_file} COPYONLY)
endforeach()

View File

@ -25,5 +25,7 @@ set_dist_list(EN_IN_DIST ${account_DATA}
CMakeLists.txt) CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/en_IN) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/en_IN)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/en_IN)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/en_IN/${acct_file} COPYONLY)
endforeach()

View File

@ -18,4 +18,7 @@ set(account_DATA
set_dist_list(ES_ES_DIST ${account_DATA} CMakeLists.txt) set_dist_list(ES_ES_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/es_ES) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/es_ES)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/es_ES)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/es_ES/${acct_file} COPYONLY)
endforeach()

View File

@ -18,5 +18,7 @@ set(account_DATA
set_dist_list(ES_MX_DIST ${account_DATA} CMakeLists.txt) set_dist_list(ES_MX_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/es_MX) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/es_MX)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/es_MX)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/es_MX/${acct_file} COPYONLY)
endforeach()

View File

@ -6,4 +6,7 @@ set(account_DATA
set_dist_list(FI_FI_DIST ${account_DATA} CMakeLists.txt) set_dist_list(FI_FI_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/fi_FI) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/fi_FI)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/fi_FI)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/fi_FI/${acct_file} COPYONLY)
endforeach()

View File

@ -19,4 +19,7 @@ set(account_DATA
set_dist_list(FR_BE_DIST ${account_DATA} CMakeLists.txt) set_dist_list(FR_BE_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/fr_BE) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/fr_BE)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/fr_BE)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/fr_BE/${acct_file} COPYONLY)
endforeach()

View File

@ -17,5 +17,7 @@ set(account_DATA
set_dist_list(FR_CA_DIST ${account_DATA} CMakeLists.txt) set_dist_list(FR_CA_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/fr_CA) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/fr_CA)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/fr_CA)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/fr_CA/${acct_file} COPYONLY)
endforeach()

View File

@ -19,4 +19,7 @@ set(account_DATA
set_dist_list(FR_CH_DIST ${account_DATA} CMakeLists.txt) set_dist_list(FR_CH_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/fr_CH) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/fr_CH)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/fr_CH)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/fr_CH/${acct_file} COPYONLY)
endforeach()

View File

@ -19,4 +19,7 @@ set(account_DATA
set_dist_list(FR_FR_DIST ${account_DATA} CMakeLists.txt) set_dist_list(FR_FR_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/fr_FR) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/fr_FR)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/fr_FR)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/fr_FR/${acct_file} COPYONLY)
endforeach()

View File

@ -21,5 +21,7 @@ set(account_DATA
set_dist_list(HE_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt) set_dist_list(HE_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/he) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/he)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/he)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/he/${acct_file} COPYONLY)
endforeach()

View File

@ -23,5 +23,7 @@ set(account_DATA
set_dist_list(HR_DIST ${account_DATA} CMakeLists.txt) # acctchrt_full.gnucash-xea set_dist_list(HR_DIST ${account_DATA} CMakeLists.txt) # acctchrt_full.gnucash-xea
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/hr) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/hr)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/hr)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/hr/${acct_file} COPYONLY)
endforeach()

View File

@ -20,5 +20,7 @@ set(account_DATA
set_dist_list(HU_DIST ${account_DATA} CMakeLists.txt) set_dist_list(HU_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/hu) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/hu)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/hu)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/hu/${acct_file} COPYONLY)
endforeach()

View File

@ -16,4 +16,7 @@ set(account_DATA
set_dist_list(IT_DIST ${account_DATA} CMakeLists.txt) set_dist_list(IT_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/it) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/it)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/it)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/it/${acct_file} COPYONLY)
endforeach()

View File

@ -20,5 +20,7 @@ set(account_DATA
set_dist_list(JA_DIST ${account_DATA} CMakeLists.txt) set_dist_list(JA_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/ja) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/ja)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/ja)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/ja/${acct_file} COPYONLY)
endforeach()

View File

@ -19,4 +19,7 @@ set(account_DATA
set_dist_list(KO_DIST ${account_DATA} CMakeLists.txt) set_dist_list(KO_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/ko) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/ko)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/ko)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/ko/${acct_file} COPYONLY)
endforeach()

View File

@ -3,4 +3,7 @@ set(account_DATA acctchrt_business.gnucash-xea)
set_dist_list(LT_DIST ${account_DATA} CMakeLists.txt) set_dist_list(LT_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/lt) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/lt)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/lt)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/lt/${acct_file} COPYONLY)
endforeach()

View File

@ -19,4 +19,7 @@ set(account_DATA
set_dist_list(LV_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt) set_dist_list(LV_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/lv) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/lv)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/lv)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/lv/${acct_file} COPYONLY)
endforeach()

View File

@ -20,4 +20,7 @@ set(account_DATA
set_dist_list(NB_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt) set_dist_list(NB_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/nb) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/nb)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/nb)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/nb/${acct_file} COPYONLY)
endforeach()

View File

@ -6,4 +6,7 @@ set(account_DATA
set_dist_list(NL_DIST ${account_DATA} CMakeLists.txt) set_dist_list(NL_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/nl) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/nl)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/nl)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/nl/${acct_file} COPYONLY)
endforeach()

View File

@ -19,4 +19,7 @@ set(account_DATA
set_dist_list(PL_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt) set_dist_list(PL_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/pl) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/pl)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/pl)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/pl/${acct_file} COPYONLY)
endforeach()

View File

@ -18,5 +18,7 @@ set(account_DATA
set_dist_list(PT_BR_DIST ${account_DATA} CMakeLists.txt) set_dist_list(PT_BR_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/pt_BR) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/pt_BR)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/pt_BR)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/pt_BR/${acct_file} COPYONLY)
endforeach()

View File

@ -17,5 +17,7 @@ set(account_DATA
set_dist_list(PT_PT_DIST ${account_DATA} CMakeLists.txt) set_dist_list(PT_PT_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/pt_PT) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/pt_PT)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/pt_PT)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/pt_PT/${acct_file} COPYONLY)
endforeach()

View File

@ -11,5 +11,7 @@ set(account_DATA
set_dist_list(RU_DIST ${account_DATA} CMakeLists.txt) set_dist_list(RU_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/ru) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/ru)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/ru)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/ru/${acct_file} COPYONLY)
endforeach()

View File

@ -18,5 +18,7 @@ set(account_DATA
set_dist_list(SK_DIST ${account_DATA} CMakeLists.txt) set_dist_list(SK_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/sk) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/sk)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/sk)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/sk/${acct_file} COPYONLY)
endforeach()

View File

@ -6,5 +6,7 @@ set(account_DATA
set_dist_list(SV_AX_DIST ${account_DATA} CMakeLists.txt) set_dist_list(SV_AX_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/sv_AX) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/sv_AX)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/sv_AX)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/sv_AX/${acct_file} COPYONLY)
endforeach()

View File

@ -6,4 +6,7 @@ set(account_DATA
set_dist_list(SV_FI_DIST ${account_DATA} CMakeLists.txt) set_dist_list(SV_FI_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/sv_FI) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/sv_FI)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/sv_FI)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/sv_FI/${acct_file} COPYONLY)
endforeach()

View File

@ -6,4 +6,7 @@ set(account_DATA
set_dist_list(SV_SE_DIST ${account_DATA} CMakeLists.txt) set_dist_list(SV_SE_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/sv_SE) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/sv_SE)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/sv_SE)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/sv_SE/${acct_file} COPYONLY)
endforeach()

View File

@ -11,4 +11,7 @@ set(account_DATA
set_dist_list(TR_TR_DIST ${account_DATA} CMakeLists.txt) set_dist_list(TR_TR_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/tr_TR) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/tr_TR)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/tr_TR)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/tr_TR/${acct_file} COPYONLY)
endforeach()

View File

@ -19,4 +19,7 @@ set(account_DATA
set_dist_list(ZH_CN_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt) set_dist_list(ZH_CN_DIST ${account_DATA} acctchrt_full.gnucash-xea CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/zh_CN) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/zh_CN)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/zn_CN)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/zh_CN/${acct_file} COPYONLY)
endforeach()

View File

@ -3,4 +3,7 @@ set(account_DATA acctchrt_business.gnucash-xea)
set_dist_list(ZH_HK_DIST ${account_DATA} CMakeLists.txt) set_dist_list(ZH_HK_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/zh_HK) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/zh_HK)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/zh_HK)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/zh_HK/${acct_file} COPYONLY)
endforeach()

View File

@ -3,4 +3,7 @@ set(account_DATA acctchrt_business.gnucash-xea)
set_dist_list(ZH_TW_DIST ${account_DATA} CMakeLists.txt) set_dist_list(ZH_TW_DIST ${account_DATA} CMakeLists.txt)
install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/zh_TW) install(FILES ${account_DATA} DESTINATION ${ACCOUNTS_INSTALL_DIR}/zh_TW)
file(COPY ${account_DATA} DESTINATION ${ACCOUNTS_BUILD_DIR}/zh_TW)
foreach(acct_file ${account_DATA})
configure_file(${acct_file} ${ACCOUNTS_BUILD_DIR}/zh_TW/${acct_file} COPYONLY)
endforeach()

View File

@ -10,6 +10,8 @@ set(checks_DATA
install(FILES ${checks_DATA} DESTINATION ${CMAKE_INSTALL_DATADIR}/gnucash/checks) install(FILES ${checks_DATA} DESTINATION ${CMAKE_INSTALL_DATADIR}/gnucash/checks)
file(COPY ${checks_DATA} DESTINATION ${DATADIR_BUILD}/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}) set_dist_list(checks_DIST CMakeLists.txt ${checks_DATA})

View File

@ -28,7 +28,9 @@ install(FILES ${doc_DATA} DESTINATION ${CMAKE_INSTALL_DOCDIR})
set_local_dist(doc_DIST_local ${doc_DATA} ${doc_noinst_DATA}) set_local_dist(doc_DIST_local ${doc_DATA} ${doc_noinst_DATA})
set(doc_DIST ${doc_DIST_local} ${examples_DIST} PARENT_SCOPE) set(doc_DIST ${doc_DIST_local} ${examples_DIST} PARENT_SCOPE)
file(COPY ${doc_DATA} DESTINATION ${DATADIR_BUILD}/doc/gnucash) foreach(doc_file ${doc_DATA})
configure_file(${doc_file} ${DATADIR_BUILD}/doc/gnucash/${doc_file} COPYONLY)
endforeach()
# Generate the tip of the day file. # Generate the tip of the day file.

View File

@ -1,4 +1,4 @@
N_( "The GnuCash online manual has lots of helpful information. \ N_( "1The GnuCash online manual has lots of helpful information. \
You can access the manual under the Help menu.") You can access the manual under the Help menu.")
N_( "The GnuCash developers are easy to contact. As well \ N_( "The GnuCash developers are easy to contact. As well \

View File

@ -64,7 +64,9 @@ set (gtkbuilder_SOURCES
window-reconcile.glade window-reconcile.glade
) )
file (COPY ${gtkbuilder_SOURCES} DESTINATION ${DATADIR_BUILD}/gnucash/gtkbuilder) foreach (gtkbuilder_file ${gtkbuilder_SOURCES})
configure_file (${gtkbuilder_file} ${DATADIR_BUILD}/gnucash/gtkbuilder/${gtkbuilder_file} COPYONLY)
endforeach()
install (FILES ${gtkbuilder_SOURCES} DESTINATION share/gnucash/gtkbuilder) install (FILES ${gtkbuilder_SOURCES} DESTINATION share/gnucash/gtkbuilder)

View File

@ -85,10 +85,13 @@ endif()
install(FILES ${aqbanking_UI} DESTINATION ${CMAKE_INSTALL_DATADIR}/gnucash/ui) install(FILES ${aqbanking_UI} DESTINATION ${CMAKE_INSTALL_DATADIR}/gnucash/ui)
file(COPY ${aqbanking_UI} foreach(ui_file ${aqbanking_UI})
DESTINATION ${DATADIR_BUILD}/gnucash/ui) configure_file(${ui_file} ${DATADIR_BUILD}/gnucash/ui/${ui_file} COPYONLY)
file(COPY ${aqbanking_GLADE} endforeach()
DESTINATION ${DATADIR_BUILD}/gnucash/gtkbuilder)
foreach(glade_file ${aqbanking_GLADE})
configure_file(${glade_file} ${DATADIR_BUILD}/gnucash/gtkbuilder/${glade_file} COPYONLY)
endforeach()
endif() endif()
set_local_dist(aqbanking_DIST_local CMakeLists.txt set_local_dist(aqbanking_DIST_local CMakeLists.txt

View File

@ -38,8 +38,9 @@ endif()
install(FILES ${ofx_UI} DESTINATION ${CMAKE_INSTALL_DATADIR}/gnucash/ui) install(FILES ${ofx_UI} DESTINATION ${CMAKE_INSTALL_DATADIR}/gnucash/ui)
file(COPY ${ofx_UI} foreach(ui_file ${ofx_UI})
DESTINATION ${DATADIR_BUILD}/gnucash/ui) configure_file(${ui_file} ${DATADIR_BUILD}/gnucash/ui/${ui_file} COPYONLY)
endforeach()
endif() endif()
set_local_dist(ofx_DIST_local CMakeLists.txt ${ofx_SOURCES} ${ofx_noinst_HEADERS} ${ofx_UI}) set_local_dist(ofx_DIST_local CMakeLists.txt ${ofx_SOURCES} ${ofx_noinst_HEADERS} ${ofx_UI})

View File

@ -31,8 +31,10 @@ endif()
install(FILES ${pycons_DATA} DESTINATION ${CMAKE_INSTALL_DATADIR}/gnucash/python/pycons) install(FILES ${pycons_DATA} DESTINATION ${CMAKE_INSTALL_DATADIR}/gnucash/python/pycons)
install(FILES init.py DESTINATION ${CMAKE_INSTALL_DATADIR}/gnucash/python) install(FILES init.py DESTINATION ${CMAKE_INSTALL_DATADIR}/gnucash/python)
file(COPY ${pycons_DATA} DESTINATION ${CMAKE_BINARY_DIR}/share/gnucash/python/pycons) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/share/gnucash/python/pycons)
file(COPY init.py DESTINATION ${CMAKE_BINARY_DIR}/share/gnucash/python) foreach(py_file ${pycons_DATA} init.py)
configure_file(${py_file} ${CMAKE_BINARY_DIR}/share/gnucash/python/${py_file} COPYONLY)
endforeach()
endif() endif()
set_local_dist(pycons_DIST ${pycons_DATA}) set_local_dist(pycons_DIST ${pycons_DATA})

View File

@ -34,7 +34,9 @@ set (ui_SOURCES
gnc-windows-menu-ui.xml gnc-windows-menu-ui.xml
osx_accel_map) osx_accel_map)
file (COPY ${ui_SOURCES} DESTINATION ${DATADIR_BUILD}/gnucash/ui) foreach (ui_file ${ui_SOURCES})
configure_file (${ui_file} ${DATADIR_BUILD}/gnucash/ui/${ui_file} COPYONLY)
endforeach()
install (FILES ${ui_SOURCES} DESTINATION share/gnucash/ui) install (FILES ${ui_SOURCES} DESTINATION share/gnucash/ui)