diff --git a/libraries.module b/libraries.module
index 7bacfdc..cf5263e 100644
--- a/libraries.module
+++ b/libraries.module
@@ -6,6 +6,32 @@
  */
 
 /**
+ * Implements hook_registry_files_alter().
+ */
+function libraries_registry_files_alter(&$files, $modules) {
+  $libraries = libraries_get_libraries();
+
+  foreach ($libraries as $name => $library) {
+    $library = libraries_info($name);
+    // Define the full library path.
+    $path = libraries_get_path($library['machine name']);
+    $path = ($library['path'] !== '' ? $path . '/' . $library['path'] : $path);
+
+    // TODO - use the module name and module weight
+    if ($library['autoload'] && is_array($library['files'])) {
+      foreach ($library['files'] as $type => $lfiles) {
+        foreach ($library['files'][$type] as $file) {
+          $files[$path . '/' . $file] = array(
+            'module' => 'libraries',
+            'weight' => 0,
+          );
+        }
+      }
+    }
+  }
+}
+
+/**
  * Gets the path of a library.
  *
  * @param $name
@@ -198,6 +224,7 @@ function libraries_info($name = NULL) {
         'variants' => array(),
         'versions' => array(),
         'integration files' => array(),
+        'autoload' => FALSE,
       );
     }
 
