             Path(file.path)
         }
 
-        inputFiles.append(gir2swiftManifest)
+        if fileManager.fileExists(atPath: gir2swiftTargetDirectoryManifest.string) {
+            inputFiles.append(gir2swiftTargetDirectoryManifest)
+        } else {
+            inputFiles.append(gir2swiftPackageDirectoryManifest)
+        }
 
         // Find all girs that this library depends on
         let girFiles = target.recursiveTargetDependencies.compactMap {


        // Determine the list of input files
        let targetDir = URL(fileURLWithPath: target.directory.string)
        let contents = try FileManager.default.contentsOfDirectory(at: targetDir, includingPropertiesForKeys: nil)

        var inputFiles = contents.filter { file in
            file.lastPathComponent.hasPrefix(girName)

    /// - Returns: the commands to run during the build
    func createBuildCommands(context: PluginContext, target: Target) throws -> [Command] {
        let targetPackageDirectory = context.package.directory
        let gir2swiftPackageDirectoryManifest = targetPackageDirectory.appending(gir2swiftManifestYaml)
        let gir2swiftTargetDirectoryManifest = target.directory.appending(gir2swiftManifestYaml)
        let outputDir = context.pluginWorkDirectory.appending("gir2swift-generated").appending(target.name)
        let fileManager = FileManager.default
        try fileManager.createDirectory(atPath: outputDir.string, withIntermediateDirectories: true)

        let girName = try getGirName(target)

