- only abort configuration if gettext is older than 0.18.1 (required for string extraction from scheme files)
- otherwise always continue but disable a few other build steps depending on the gettext version
- use feature variables to more clearly convey what is enabled or disabled
message(WARNING"Got gettext version ${GETTEXT_VERSION_STRING}, however you need at least gettext version 0.19 in order to handle translation of the gnucash.desktop file. The build will be configured with an untranslated gnucash.desktop file.")
find_package(Gettext0.18.1REQUIRED)
if(${GETTEXT_VERSION_STRING}VERSION_LESS0.20)
message(WARNING"Gettext version 0.20 or more recent is required to translate the 'developer_name' tag in gnucash.appdata.xml. All but that tag will be translated in the generated file.")
message(WARNING"Gettext version 0.20 or more recent is required to extract all translatable strings. Potfile generation will be disabled.")
endif()
set(BUILD_GNUCASH_POTOFF)
endif()
if(${GETTEXT_VERSION_STRING}VERSION_LESS0.19.6)
message(WARNING"Got gettext version ${GETTEXT_VERSION_STRING}, however you need at least gettext version 0.19.6 in order to handle translation of the gnucash.appdata file. The build will be configured with an untranslated gnucash.appdata file.")
set(TRANSLATE_GNUCASH_APPDATAOFF)
message(WARNING"Gettext version 0.19.6 or more recent is required to translate gnucash.appdata.xml. The build will be configured to generate an untranslated gnucash.appdata.xml.")
endif()
if(${GETTEXT_VERSION_STRING}VERSION_LESS0.20)
message(WARNING"Got gettext version ${GETTEXT_VERSION_STRING}, however you need at least gettext version 0.20 in order to handle the translation of 'GnuCash Project' from the gnucash.appdata file. That message will be missing in gnucash.pot.")
if(${GETTEXT_VERSION_STRING}VERSION_LESS0.19)
set(TRANSLATE_GNUCASH_DESKTOPOFF)
message(WARNING"Gettext version 0.19 or more recent is required to translate gnucash.desktop. The build will be configured to generate an untranslated gnucash.desktop.")
set(gnucash_pot_depends${POTFILE_DEPS}CACHEINTERNAL"List of files with translatable strings. If any of these change, gnucash.pot should be regenerated")