summaryrefslogtreecommitdiffstats
path: root/kworldclock/CMakeLists.txt
blob: 624bb13b7fc5273edb6fd5e0c9e96a7e187bcf9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#################################################
#
#  (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
#
#################################################

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 kworldclock-themes
    )
  endif()
endforeach()