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

foreach( _completion IN LISTS _completions )
  if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_completion} )
    file( GLOB _files ${_completion}/*.cwl )
    list( SORT _files )
    install(
      FILES ${_files}
      DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/complete/${_completion}
    )
  endif()
endforeach()
