1 # Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 SET(POFILES de.po el.po en_US.po es.po fr.po it.po ja.po ko.po nl.po pt.po ru.po tk.po zh_CN.po zh_HK.po zh_TW.po)
18 SET(MSGFMT "/usr/bin/msgfmt")
20 FOREACH(pofile ${POFILES})
21 SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
22 MESSAGE("PO: ${pofile}")
23 GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
24 GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
25 SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
28 COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
31 # INSTALL(FILES ${moFile}
32 # DESTINATION share/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
33 INSTALL(FILES ${moFile}
34 DESTINATION share/locale/${lang}/LC_MESSAGES RENAME wrt-client.mo)
35 SET(moFiles ${moFiles} ${moFile})
38 MESSAGE(".mo files: ${moFiles}")
39 ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})