Commit 594cb219 authored by Ryan Hunt's avatar Ryan Hunt
Browse files

Search for staticlib crate types in addition to lib crate types

parent eb71d0da
......@@ -107,11 +107,13 @@ impl Cargo {
pub fn find_crate_src(&self, package: &PackageRef) -> Option<PathBuf> {
let kind_lib = String::from("lib");
let kind_staticlib = String::from("staticlib");
for meta_package in &self.metadata.packages {
if meta_package.name == package.name &&
meta_package.version == package.version {
for target in &meta_package.targets {
if target.kind.contains(&kind_lib) {
if target.kind.contains(&kind_lib) ||
target.kind.contains(&kind_staticlib) {
return Some(PathBuf::from(&target.src_path));
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment