include(CMakePackageConfigHelpers)
# Configure '<PROJECT-NAME>Config.cmake'
# Use variables:
#   - TARGETS_EXPORT_NAME
#   - PROJECT_NAME
configure_package_config_file(
    "${PROJECT_SOURCE_DIR}/cmake/Config.cmake.in"
    "${PROJECT_CONFIG_FILE}"
      INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}"
)

# Config
#   - <prefix>/lib/cmake/Foo/FooConfig.cmake
install(
    FILES       "${PROJECT_CONFIG_FILE}"
    DESTINATION "${CONFIG_INSTALL_DIR}"
)
message(${PROJECT_CONFIG_FILE})
