From 1463c34d97a28247996d085a535535358afee3cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 18 Jun 2020 00:52:47 +0200 Subject: [PATCH] Use common rules for kworldclock themes. Install SVG and SVGZ wallpapers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This addresses the shortcomings of the recent commit. Signed-off-by: Slávek Banko (cherry picked from commit a37036141b3ab08fd5aba8a5ebf473e04690886d) --- kworldclock/CMakeLists.txt | 30 +++++++++++++++++++++++------ kworldclock/alt/CMakeLists.txt | 23 ---------------------- kworldclock/bio/CMakeLists.txt | 23 ---------------------- kworldclock/caida/CMakeLists.txt | 23 ---------------------- kworldclock/caida_bw/CMakeLists.txt | 23 ---------------------- kworldclock/mggd/CMakeLists.txt | 23 ---------------------- kworldclock/rainfall/CMakeLists.txt | 23 ---------------------- wallpapers/CMakeLists.txt | 2 +- 8 files changed, 25 insertions(+), 145 deletions(-) delete mode 100644 kworldclock/alt/CMakeLists.txt delete mode 100644 kworldclock/bio/CMakeLists.txt delete mode 100644 kworldclock/caida/CMakeLists.txt delete mode 100644 kworldclock/caida_bw/CMakeLists.txt delete mode 100644 kworldclock/mggd/CMakeLists.txt delete mode 100644 kworldclock/rainfall/CMakeLists.txt diff --git a/kworldclock/CMakeLists.txt b/kworldclock/CMakeLists.txt index a255f2da..2f359034 100644 --- a/kworldclock/CMakeLists.txt +++ b/kworldclock/CMakeLists.txt @@ -3,15 +3,33 @@ # (C) 2010 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 # ################################################# -add_subdirectory( alt ) -add_subdirectory( bio ) -add_subdirectory( caida ) -add_subdirectory( caida_bw ) -add_subdirectory( mggd ) -add_subdirectory( rainfall ) +file( GLOB _themes RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * ) +list( SORT _themes ) + +foreach( _theme IN LISTS _themes ) + if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_theme} AND + EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_theme}/${_theme}.desktop ) + file( GLOB _map_images RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${_theme}/*.jpg ) + list( SORT _map_images ) + + install( + FILES ${_map_images} + DESTINATION "${DATA_INSTALL_DIR}/kworldclock/maps/${_theme}" + ) + + tde_create_translated_desktop( + SOURCE ${_theme}/${_theme}.desktop + DESTINATION "${DATA_INSTALL_DIR}/kworldclock/maps/${_theme}" + PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/kworldclock-themes + ) + endif() +endforeach() diff --git a/kworldclock/alt/CMakeLists.txt b/kworldclock/alt/CMakeLists.txt deleted file mode 100644 index b8cbe7eb..00000000 --- a/kworldclock/alt/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -################################################# -# -# (C) 2011 Golubev Alexander -# fatzer2 (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( FILES - 1200.jpg - 200.jpg - 400.jpg - 800.jpg - DESTINATION "${DATA_INSTALL_DIR}/kworldclock/maps/alt" ) - -tde_create_translated_desktop( - SOURCE alt.desktop - DESTINATION "${DATA_INSTALL_DIR}/kworldclock/maps/alt" - PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/kworldclock-themes -) diff --git a/kworldclock/bio/CMakeLists.txt b/kworldclock/bio/CMakeLists.txt deleted file mode 100644 index 433f4155..00000000 --- a/kworldclock/bio/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -################################################# -# -# (C) 2011 Golubev Alexander -# fatzer2 (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( FILES - 1600.jpg - 200.jpg - 400.jpg - 800.jpg - DESTINATION "${DATA_INSTALL_DIR}/kworldclock/maps/bio" ) - -tde_create_translated_desktop( - SOURCE bio.desktop - DESTINATION "${DATA_INSTALL_DIR}/kworldclock/maps/alt" - PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/kworldclock-themes -) diff --git a/kworldclock/caida/CMakeLists.txt b/kworldclock/caida/CMakeLists.txt deleted file mode 100644 index db551fe6..00000000 --- a/kworldclock/caida/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -################################################# -# -# (C) 2011 Golubev Alexander -# fatzer2 (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( FILES - 1280.jpg - 200.jpg - 400.jpg - 800.jpg - DESTINATION "${DATA_INSTALL_DIR}/kworldclock/maps/caida" ) - -tde_create_translated_desktop( - SOURCE caida.desktop - DESTINATION "${DATA_INSTALL_DIR}/kworldclock/maps/alt" - PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/kworldclock-themes -) diff --git a/kworldclock/caida_bw/CMakeLists.txt b/kworldclock/caida_bw/CMakeLists.txt deleted file mode 100644 index c10798b1..00000000 --- a/kworldclock/caida_bw/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -################################################# -# -# (C) 2011 Golubev Alexander -# fatzer2 (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( FILES - 1280.jpg - 200.jpg - 400.jpg - 800.jpg - DESTINATION "${DATA_INSTALL_DIR}/kworldclock/maps/caida_bw" ) - -tde_create_translated_desktop( - SOURCE caida_bw.desktop - DESTINATION "${DATA_INSTALL_DIR}/kworldclock/maps/alt" - PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/kworldclock-themes -) diff --git a/kworldclock/mggd/CMakeLists.txt b/kworldclock/mggd/CMakeLists.txt deleted file mode 100644 index 5e123d3e..00000000 --- a/kworldclock/mggd/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -################################################# -# -# (C) 2011 Golubev Alexander -# fatzer2 (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( FILES - 1440.jpg - 200.jpg - 400.jpg - 800.jpg - DESTINATION "${DATA_INSTALL_DIR}/kworldclock/maps/mggd" ) - -tde_create_translated_desktop( - SOURCE mggd.desktop - DESTINATION "${DATA_INSTALL_DIR}/kworldclock/maps/alt" - PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/kworldclock-themes -) diff --git a/kworldclock/rainfall/CMakeLists.txt b/kworldclock/rainfall/CMakeLists.txt deleted file mode 100644 index 78f2984e..00000000 --- a/kworldclock/rainfall/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -################################################# -# -# (C) 2011 Golubev Alexander -# fatzer2 (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( FILES - 1600.jpg - 200.jpg - 400.jpg - 800.jpg - DESTINATION "${DATA_INSTALL_DIR}/kworldclock/maps/rainfall" ) - -tde_create_translated_desktop( - SOURCE rainfall.desktop - DESTINATION "${DATA_INSTALL_DIR}/kworldclock/maps/alt" - PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/kworldclock-themes -) diff --git a/wallpapers/CMakeLists.txt b/wallpapers/CMakeLists.txt index f0c05f28..c2fa86b0 100644 --- a/wallpapers/CMakeLists.txt +++ b/wallpapers/CMakeLists.txt @@ -12,7 +12,7 @@ # ################################################# -file( GLOB _wallpapers RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.jpg *.png ) +file( GLOB _wallpapers RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.jpg *.png *.svg *.svgz ) list( SORT _wallpapers) foreach( _wallpaper IN LISTS _wallpapers )