mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Support building SourceKit-LSP without a dependency on SwiftPM
This commit is contained in:
@@ -59,9 +59,13 @@ package func determineBuildSystem(
|
||||
return BuildSystemSpec(kind: .compilationDatabase, projectRoot: projectRoot)
|
||||
}
|
||||
case .swiftPM:
|
||||
#if canImport(PackageModel)
|
||||
if let projectRoot = SwiftPMBuildSystem.projectRoot(for: workspaceFolderUrl, options: options) {
|
||||
return BuildSystemSpec(kind: .swiftPM, projectRoot: projectRoot)
|
||||
}
|
||||
#else
|
||||
return nil
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user