diff --git a/Cargo.toml b/Cargo.toml index d432067..d99fc66 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xmake" -version = "0.3.2" +version = "0.3.4" edition = "2021" license = "MIT" keywords = ["build-dependencies"] diff --git a/README.md b/README.md index 1ebedeb..11a7d33 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,12 @@ library. ```toml # Cargo.toml [build-dependencies] -xmake = "0.3.2" +xmake = "0.3.4" ``` The XMake executable is assumed to be `xmake` unless the `XMAKE` environmental variable is set. -There is some examples in the `tests` folder of the repo. +There is some examples in the `tests` folder of the repo. ## Difference from cmake-rs @@ -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. \ No newline at end of file +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. diff --git a/src/lib.rs b/src/lib.rs index 6fa5ce2..95dae07 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,7 @@ //! //! ```toml //! [build-dependencies] -//! xmake = "0.3.2" +//! xmake = "0.3.4" //! ``` //! //! ## Examples @@ -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), @@ -490,7 +490,7 @@ impl Config { .clone() .unwrap_or_else(|| PathBuf::from(getenv_unwrap("OUT_DIR"))); - cmd.arg(format!("--buildir={}", dst.display())); + cmd.arg(format!("--builddir={}", dst.display())); // Cross compilation let host = getenv_unwrap("HOST"); @@ -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;