summaryrefslogtreecommitdiffstats
path: root/po/CMakeLists.txt
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-05 03:50:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-05 03:50:29 +0000
commit5cf5e6b8214ace7beb2836bce2f2b3e3324222ca (patch)
tree379e5636d96beeaa73a73fd1824b6ba2975d088e /po/CMakeLists.txt
parentb739bb3004a7aa23de0f9f5360011e81cd2f7b54 (diff)
downloadgtk-qt-engine-5cf5e6b8214ace7beb2836bce2f2b3e3324222ca.tar.gz
gtk-qt-engine-5cf5e6b8214ace7beb2836bce2f2b3e3324222ca.zip
Migrate gtk-qt-trinity to new CMake system (mostly)
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/gtk-qt-engine@1230450 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'po/CMakeLists.txt')
-rw-r--r--po/CMakeLists.txt49
1 files changed, 5 insertions, 44 deletions
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index c5fef00..9d1908d 100644
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -1,45 +1,6 @@
-# .po to .gmo stuff
-FILE(GLOB _pofiles *.po)
+file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
-FOREACH(_file ${_pofiles})
- GET_FILENAME_COMPONENT(_file_we ${_file} NAME_WE)
- SET(_out "${_file_we}.gmo")
- SET(_in "${_file_we}.po")
-
- ADD_CUSTOM_COMMAND(
- OUTPUT ${_out}
- COMMAND ${MSGFMT_EXECUTABLE} -o ${_out} ${_in}
- DEPENDS ${_in}
- )
-
- INSTALL(
- FILES ${_out}
- DESTINATION share/locale/${_file_we}/LC_MESSAGES/
- RENAME gtkqtengine.mo
- )
-
- SET(_outputs ${_outputs} ${_out})
-ENDFOREACH(_file)
-
-ADD_CUSTOM_TARGET(
- pofiles ALL
- DEPENDS ${_outputs}
-)
-
-
-# Stuff to generate the .pot
-FILE(GLOB POT_UIFILES ../kcm_gtk/*.ui)
-SET(POT_SOURCES ../kcm_gtk/kcmgtk.cpp)
-SET(POT_OUTPUT gtkqtengine.pot)
-
-ADD_CUSTOM_COMMAND(
- OUTPUT _${POT_OUTPUT}
- COMMAND ${EXTRACTRC_PATH} ${POT_UIFILES} > rc.cpp
- COMMAND ${XGETTEXT_PATH} --foreign-user -C -ci18n -ki18n -ktr2i18n -kI18N_NOOP -kI18N_NOOP2 -kaliasLocale -x "${KDE3_INCLUDE_DIR}/kde.pot" -o ${POT_OUTPUT} rc.cpp ${POT_SOURCES}
- COMMAND rm rc.cpp
-)
-
-ADD_CUSTOM_TARGET(
- extract_messages
- DEPENDS _${POT_OUTPUT}
-)
+foreach( _po ${po_files} )
+ get_filename_component( _lang ${_po} PATH )
+ tde_create_translation( FILES ${_po} LANG ${_lang} )
+endforeach( )