mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-12 04:58:57 +00:00
[cmake] fix installation of translations
This commit is contained in:
parent
164108d0a9
commit
020fe5ccdf
2 changed files with 12 additions and 1 deletions
|
@ -191,6 +191,16 @@ INSTALL(FILES CHANGELOG.md DESTINATION ${docdir})
|
|||
# $v $(INSTALL) -m 644 share/lynx.lss $(DESTDIR)$(datadir)/fish/
|
||||
INSTALL(FILES share/lynx.lss DESTINATION ${rel_datadir}/fish/)
|
||||
|
||||
# These files are built by cmake/gettext.cmake, but using GETTEXT_PROCESS_PO_FILES's
|
||||
# INSTALL_DESTINATION leads to them being installed as ${lang}.gmo, not fish.mo
|
||||
# The ${languages} array comes from cmake/gettext.cmake
|
||||
IF(GETTEXT_FOUND)
|
||||
FOREACH(lang ${languages})
|
||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${lang}.gmo DESTINATION
|
||||
${CMAKE_INSTALL_LOCALEDIR}/${lang}/LC_MESSAGES/ RENAME fish.mo)
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
|
||||
# Group install targets into a InstallTargets folder
|
||||
SET_PROPERTY(TARGET build_fish_pc CHECK-FISH-BUILD-VERSION-FILE
|
||||
test_invocation test_fishscript
|
||||
|
|
|
@ -16,8 +16,9 @@ ADD_FEATURE_INFO(gettext GETTEXT_FOUND "translate messages with gettext")
|
|||
# Define translations
|
||||
IF(GETTEXT_FOUND)
|
||||
FOREACH(lang ${languages})
|
||||
# Our translations aren't set up entirely as CMake expects, so installation is done in
|
||||
# cmake/Install.cmake instead of using INSTALL_DESTINATION
|
||||
GETTEXT_PROCESS_PO_FILES(${lang} ALL
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_FULL_LOCALEDIR}
|
||||
PO_FILES po/${lang}.po)
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
|
|
Loading…
Reference in a new issue