Skip to content

Commit 8dd8774

Browse files
Tomcat-42awakecoding
authored andcommitted
Fix deps include dirs listing
1 parent ed34d39 commit 8dd8774

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/install/build_info/build_dependency.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ where
4040
deserializer.deserialize_option(JsonStringOrStringVecVisitor)
4141
}
4242

43+
/// A build dependency.
4344
#[derive(Serialize, Deserialize)]
4445
pub struct BuildDependency {
4546
pub(crate) version: String,
@@ -72,8 +73,8 @@ impl BuildDependency {
7273
self.lib_paths.get(0).map(|x| &**x)
7374
}
7475

75-
pub fn get_include_dir(&self) -> Option<&str> {
76-
self.include_paths.get(0).map(|x| &**x)
76+
pub fn get_include_dirs(&self) -> Vec<&str> {
77+
self.include_paths.iter().map(|x| &**x).collect()
7778
}
7879

7980
pub fn get_binary_dir(&self) -> Option<&str> {

src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ mod util;
55

66
// API
77
pub use build::{BuildCommand, BuildCommandBuilder};
8-
pub use install::{build_info::BuildSettings, BuildPolicy, InstallCommand, InstallCommandBuilder};
9-
pub use package::{PackageCommand, PackageCommandBuilder, ConanPackage};
8+
pub use install::{
9+
build_info::{BuildDependency, BuildInfo, BuildSettings},
10+
BuildPolicy, InstallCommand, InstallCommandBuilder,
11+
};
12+
pub use package::{ConanPackage, PackageCommand, PackageCommandBuilder};

0 commit comments

Comments
 (0)