
file( GLOB _themes RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * )
list( SORT _themes )

foreach( _theme IN LISTS _themes )
  if( NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_theme} )
    list( REMOVE_ITEM _themes "${_theme}" )
  endif()
endforeach()

install(
   DIRECTORY ${_themes}
   DESTINATION ${DATA_INSTALL_DIR}/kmymoney2/icons
   FILES_MATCHING
     PATTERN "*.gif"
     PATTERN "*.png"
     PATTERN "*.svgz"
)
