Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xmake"
version = "0.3.2"
version = "0.3.3"
edition = "2021"
license = "MIT"
keywords = ["build-dependencies"]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ library.
```toml
# Cargo.toml
[build-dependencies]
xmake = "0.3.2"
xmake = "0.3.3"
```

The XMake executable is assumed to be `xmake` unless the `XMAKE`
Expand All @@ -29,4 +29,4 @@ xrepo env -b "emscripten, ndk" shell
```
After executing one of these commands, xmake will automatically detect either the emscripten or NDK toolchain.

If you prefer to use your own toolchain, you can set either the ANDROID_NDK_HOME or EMSCRIPTEN_HOME environment variables to specify the path to the corresponding toolchain.
If you prefer to use your own toolchain, you can set either the ANDROID_NDK_HOME or EMSCRIPTEN_HOME environment variables to specify the path to the corresponding toolchain.
42 changes: 24 additions & 18 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//!
//! ```toml
//! [build-dependencies]
//! xmake = "0.3.2"
//! xmake = "0.3.3"
//! ```
//!
//! ## Examples
Expand Down Expand Up @@ -187,7 +187,7 @@ impl FromStr for LinkKind {
match s {
"static" => Ok(LinkKind::Static),
"shared" => Ok(LinkKind::Dynamic),
"system" => Ok(LinkKind::System),
"system" | "syslinks" => Ok(LinkKind::System),
"framework" => Ok(LinkKind::Framework),
"unknown" => Ok(LinkKind::Unknown),
_ => Err(ParsingError::InvalidKind),
Expand Down Expand Up @@ -1471,25 +1471,31 @@ mod tests {
let expected_directories = ["path/to/libA", "path/to/libB", "path\\to\\libC"]
.map(PathBuf::from)
.to_vec();

let expected_includedirs_package_a = to_set(["includedir/a", "includedir\\aa"]
.map(PathBuf::from)
.to_vec());
let expected_includedirs_package_b = to_set(["includedir/bb", "includedir\\b"]
.map(PathBuf::from)
.to_vec());

let expected_includedirs_package_a = to_set(
["includedir/a", "includedir\\aa"]
.map(PathBuf::from)
.to_vec(),
);
let expected_includedirs_package_b = to_set(
["includedir/bb", "includedir\\b"]
.map(PathBuf::from)
.to_vec(),
);

let expected_includedirs_target_c = to_set(["includedir/c"].map(PathBuf::from).to_vec());

let expected_includedirs_both_greedy = to_set([
"includedir/c",
"includedir/bb",
"includedir\\b",
"includedir/a",
"includedir\\aa",
]
.map(PathBuf::from)
.to_vec());
let expected_includedirs_both_greedy = to_set(
[
"includedir/c",
"includedir/bb",
"includedir\\b",
"includedir/a",
"includedir\\aa",
]
.map(PathBuf::from)
.to_vec(),
);

let expected_cxx = true;
let expected_stl = false;
Expand Down