diff --git a/cmake/KF5I18nMacros.cmake.in b/cmake/KF5I18nMacros.cmake.in --- a/cmake/KF5I18nMacros.cmake.in +++ b/cmake/KF5I18nMacros.cmake.in @@ -89,15 +89,19 @@ # # KI18N_INSTALL(po) does the following: # - Compiles kfoo.po into kfoo.mo and installs it in -# ${LOCALE_INSTALL_DIR}/fr/LC_MESSAGES or share/locale/fr/LC_MESSAGES if -# ${LOCALE_INSTALL_DIR} is not set. -# - Installs kfoo.js in ${LOCALE_INSTALL_DIR}/fr/LC_SCRIPTS/kfoo +# ${KDE_INSTALL_LOCALEDIR}/fr/LC_MESSAGES or share/locale/fr/LC_MESSAGES if +# ${KDE_INSTALL_LOCALEDIR} is not set. +# - Installs kfoo.js in ${KDE_INSTALL_LOCALEDIR}/fr/LC_SCRIPTS/kfoo # # KI18N_INSTALL_TS_FILES() is deprecated, use KI18N_INSTALL() # function(KI18N_INSTALL podir) - if (NOT LOCALE_INSTALL_DIR) - set(LOCALE_INSTALL_DIR share/locale) + if (NOT KDE_INSTALL_LOCALEDIR) + if (LOCALE_INSTALL_DIR) # TODO KF6: deprecated, remove + set(KDE_INSTALL_LOCALEDIR ${LOCALE_INSTALL_DIR}) + else() + set(KDE_INSTALL_LOCALEDIR share/locale) + endif() endif() # First try to find the po directory in the source directory, where the release scripts copy them before making the tarballs @@ -111,12 +115,12 @@ if (NOT (EXISTS "${absolute_podir}" AND IS_DIRECTORY "${absolute_podir}")) # Nothing to do if there's no podir and it would create an empty - # LOCALE_INSTALL_DIR in that case. + # KDE_INSTALL_LOCALEDIR in that case. return() endif() - get_filename_component(dirname ${LOCALE_INSTALL_DIR} NAME) - get_filename_component(destname ${LOCALE_INSTALL_DIR} DIRECTORY) + get_filename_component(dirname ${KDE_INSTALL_LOCALEDIR} NAME) + get_filename_component(destname ${KDE_INSTALL_LOCALEDIR} DIRECTORY) string(MD5 pathmd5 ${absolute_podir}) add_custom_target(pofiles-${pathmd5} ALL @@ -163,7 +167,7 @@ get_filename_component(subpath ${ts_file} DIRECTORY) get_filename_component(subpath ${subpath} NAME) install(FILES ${ts_file} - DESTINATION ${LOCALE_INSTALL_DIR}/${lang}/LC_SCRIPTS/${subpath}) + DESTINATION ${KDE_INSTALL_LOCALEDIR}/${lang}/LC_SCRIPTS/${subpath}) # If current file is a pmap, also install the compiled version. get_filename_component(ts_ext ${ts_file} EXT) if(ts_ext STREQUAL ".pmap") @@ -180,7 +184,7 @@ ${pmapc_file} DEPENDS ${pmap_file}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pmapc_file} - DESTINATION ${LOCALE_INSTALL_DIR}/${lang}/LC_SCRIPTS/${subpath} + DESTINATION ${KDE_INSTALL_LOCALEDIR}/${lang}/LC_SCRIPTS/${subpath} RENAME ${pmapc_basename}) list(APPEND pmapc_files ${pmapc_file}) endif()