#
# cmake module CMakeList.txt
#
set(CAMITK_CMAKE_PATH "share/${CAMITK_SHORT_VERSION_STRING}/cmake")

# install CamiTK configuration file
install(FILES ${CMAKE_BINARY_DIR}/share/${CAMITK_SHORT_VERSION_STRING}/cmake/CamiTKConfig.cmake
        DESTINATION ${CAMITK_CMAKE_PATH}
        # COMPONENT cmake-modules)
        )
        
# install the generic cmake files
file(GLOB CAMITK_CMAKE_FILES "modules/*.cmake")
install(FILES ${CAMITK_CMAKE_FILES}
        DESTINATION ${CAMITK_CMAKE_PATH}
        # COMPONENT cmake-modules)
        )
        
# install the macros 
file(GLOB CAMITK_CMAKE_FILES "modules/macros/*.cmake")
install(FILES ${CAMITK_CMAKE_FILES}
        DESTINATION ${CAMITK_CMAKE_PATH}/macros
        # COMPONENT cmake-modules)
        )
        
# install launcher-templates
file(GLOB CAMITK_CMAKE_FILES "modules/launcher-templates/*.in")
install(FILES ${CAMITK_CMAKE_FILES}
        DESTINATION ${CAMITK_CMAKE_PATH}/launcher-templates
        # COMPONENT cmake-modules)
        )
        
# Save the compiler settings so another project can import them.
include(${CMAKE_ROOT}/Modules/CMakeExportBuildSettings.cmake)
cmake_export_build_settings(${CMAKE_CURRENT_BINARY_DIR}/../CamiTKBuildSettings.cmake)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/../CamiTKBuildSettings.cmake"
        DESTINATION ${CAMITK_CMAKE_PATH}
        # COMPONENT cmake-modules)
        )
        