# install the cmake files

file(GLOB cmakeFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.cmake")

set(module_install_dir ${DATA_INSTALL_DIR}/cmake/modules )

install(
  FILES
    ${cmakeFiles}
  DESTINATION
  ${module_install_dir}
)
# the files listed here will be removed by remove_obsoleted_cmake_files.cmake, Alex
set(FILES_TO_REMOVE
)

install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake )

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "#generated by cmake, don't edit\n\n")
foreach ( _current_FILE ${FILES_TO_REMOVE})
   file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "message(STATUS \"Removing ${module_install_dir}/${_current_FILE}\" )\n" )
   file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "exec_program( ${CMAKE_COMMAND} ARGS -E remove ${module_install_dir}/${_current_FILE} OUTPUT_VARIABLE _dummy)\n" )
endforeach ( _current_FILE)
