From 2f706891f32258c2b070471905f983e4585296d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 26 Jun 2020 11:36:35 +0200 Subject: Desktop file translations: + Creation of POT template for desktop files added to CMakeL10n rules. + Added creation of translated desktop files during build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- kdesktop/patterns/CMakeLists.txt | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'kdesktop/patterns/CMakeLists.txt') diff --git a/kdesktop/patterns/CMakeLists.txt b/kdesktop/patterns/CMakeLists.txt index a6bfa053b..bf0475400 100644 --- a/kdesktop/patterns/CMakeLists.txt +++ b/kdesktop/patterns/CMakeLists.txt @@ -3,15 +3,29 @@ # (C) 2010-2011 Serghei Amelian # serghei (DOT) amelian (AT) gmail.com # +# (C) 2020 Slávek Banko +# slavek.banko (AT) axis.cz +# # Improvements and feedback are welcome # # This file is released under GPL >= 2 # ################################################# -install( FILES - night-rock.desktop night-rock.jpg stonewall2.png - stonewall2.desktop fish.desktop fish.png flowers.desktop - flowers.png pavement.desktop pavement.png rattan.desktop - rattan.png triangles.desktop triangles.png - DESTINATION ${DATA_INSTALL_DIR}/kdesktop/patterns ) +file( GLOB _patterns RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png *.jpg ) +list( SORT _patterns ) + +foreach( _pattern IN LISTS _patterns ) + get_filename_component( _pattern_name ${_pattern} NAME_WE ) + if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_pattern_name}.desktop ) + install( + FILES ${_pattern} + DESTINATION ${DATA_INSTALL_DIR}/kdesktop/patterns + ) + tde_create_translated_desktop( + SOURCE ${_pattern_name}.desktop + DESTINATION ${DATA_INSTALL_DIR}/kdesktop/patterns + PO_DIR kdesktop-desktops + ) + endif() +endforeach() -- cgit v1.2.1