Skip to content

Commit 8e6c289

Browse files
authored
Merge pull request #1212 from cbgbt/readme-rpath-attr
Update README.md to fix attribute syntax for rpath instructions
2 parents 36599ec + 8abbf30 commit 8e6c289

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ Since 0.31, this crate supports a feature named "bundled" which compiles SDL2 fr
4646
By default, macOS and Linux only load libraries from system directories like `/usr/lib`. If you wish to distribute the newly built libSDL2.so/libSDL2.dylib alongside your executable, you will need to add rpath to your executable. Add the following lines to `build.rs` script:
4747

4848
```rust
49-
[cfg(target_os="macos")]
49+
#[cfg(target_os="macos")]
5050
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path");
5151

52-
[cfg(target_os="linux")]
52+
#[cfg(target_os="linux")]
5353
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN");
5454
```
5555

0 commit comments

Comments
 (0)