Talk:Development/Tutorials/Localization/i18n Build Systems

Jump to: navigation, search

Contents

Thread titleRepliesLast modified
== Compiling and installing message catalogs ==112:30, 5 July 2017

== Compiling and installing message catalogs ==

Consider some editions to example CmakeLists.txt in #Compiling and installing message catalogs section.

For ${LOCALE_INSTALL_DIR} var to be set, I added the following at the beginning:

   find_package(Gettext REQUIRED)
   find_package(ECM 0.0.12 REQUIRED)
   set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
   include(KDEInstallDirs)

Also I changed

   ADD_CUSTOM_COMMAND(TARGET ${_gmoFile}

to

   ADD_CUSTOM_COMMAND(OUTPUT ${_gmoFile}

otherwise it was not working for me.

Please, check that all is correct and then I will add it to page.

Ashark (talk)19:59, 2 May 2017

Ups, I apologize, I didn't notice the notification about this proposed change.

The first part is fine (the find_package ECM) but the rest can be simplified: there is a macro provided by KI18n (which should be searched as well) and called ki18n_install which does all the magic. See: https://cgit.kde.org/ki18n.git/tree/cmake/KF5I18NMacros.cmake?h=v5.35.0#n87

Tosky (talk)12:30, 5 July 2017
 

This page was last modified on 2 May 2017, at 19:59. Content is available under Creative Commons License SA 4.0 unless otherwise noted.