brson / brson/rust-sdl

dealing with macports' placement of libraries

Open
#45 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
180
Forks
48
PR merge metrics
No merged PRs in 30d

Description

MacPorts puts libraries in /opt/local/lib, which causes problems in two places: first, in the configure file, /opt/local/lib isn't one of the places it looks for the .dylib files. That's easy enough to hack in. Slightly more problematically, I couldn't figure out how to add "-L /opt/local/lib" into the linker flags. I finally just jammed it directly into the linker flags source in sdl.rs, using

```
// Setup linking for all targets.
#[cfg(target_os="macos")]
mod mac {
#[cfg(mac_framework)]
#[link_args="-framework SDL"]
extern {}

#[cfg(mac_dylib)]
#[link_args="-L /opt/local/lib -lSDL"]
extern {}
}
```

... but that's completely gross. I didn't see a way to do computation on the right-hand-side of the #[link_args=...] attribute, though I didn't spend more than 5 minutes digging.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.