diff options
author | Slávek Banko <[email protected]> | 2019-02-13 22:59:19 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2019-02-13 22:59:32 +0100 |
commit | a4edb47f005d021dcd16999ec039b279ba4eb584 (patch) | |
tree | 447b37ef4d76be796020ed4983aac88a2145762d /po/CMakeLists.txt | |
parent | 5473a3eb39a094d820c0c82f8c2910f6ad91384c (diff) | |
download | tde-style-qtcurve-a4edb47f005d021dcd16999ec039b279ba4eb584.tar.gz tde-style-qtcurve-a4edb47f005d021dcd16999ec039b279ba4eb584.zip |
Use common CMake tests.
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit ea8d5387f2d3f1d986341228715b235e96995e15)
Diffstat (limited to 'po/CMakeLists.txt')
-rw-r--r-- | po/CMakeLists.txt | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt index e76a565..deef1da 100644 --- a/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -1,25 +1,5 @@ -find_program(GETTEXT_MSGFMT_EXECUTABLE msgfmt) - -if(NOT GETTEXT_MSGFMT_EXECUTABLE) - message("------\n" - "NOTE: msgfmt not found. Translations will *not* be installed\n" - "------\n") -else(NOT GETTEXT_MSGFMT_EXECUTABLE) - set(catalogname qtcurve) - add_custom_target(translations ALL) - file(GLOB PO_FILES *.po) - foreach(_poFile ${PO_FILES}) - get_filename_component(_poFileName ${_poFile} NAME) - string(REGEX REPLACE "^${catalogname}_?" "" _langCode ${_poFileName} ) - string(REGEX REPLACE "\\.po$" "" _langCode ${_langCode} ) - if(_langCode) - get_filename_component(_lang ${_poFile} NAME_WE) - set(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo) - add_custom_command(TARGET translations - COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} --check -o ${_gmoFile} ${_poFile} - DEPENDS ${_poFile}) - install(FILES ${_gmoFile} DESTINATION ${KDE3_LOCALE_PREFIX}/${_langCode}/LC_MESSAGES/ RENAME ${catalogname}.mo) - endif( _langCode ) - endforeach(_poFile ${PO_FILES}) -endif(NOT GETTEXT_MSGFMT_EXECUTABLE) +file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po ) +if( _srcs ) + tde_create_translation( LANG auto OUTPUT_NAME qtcurve ) +endif( ) |