summaryrefslogtreecommitdiffstats
path: root/presets/CMakeLists.txt
blob: e040c1a068b41644485a2ecaa1192082ede7357b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
file( GLOB_RECURSE _preset_dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/* )

unset( _dirs )
foreach( _preset_dir IN LISTS _preset_dirs )
  get_filename_component( _dir ${_preset_dir} PATH )
  list( APPEND _dirs ${_dir} )
endforeach()
if( _dirs )
  list( SORT _dirs )
  list( REMOVE_DUPLICATES _dirs )
endif()

foreach( _dir IN LISTS _dirs )
  file( GLOB _krp_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${_dir}/*.krp )

  if( _krp_files )
    install(
      FILES ${_krp_files}
      DESTINATION ${DATA_INSTALL_DIR}/tderadio/presets/${_dir}
    )
  endif()
endforeach()