Skip to content

dealing with macports' placement of libraries #45

@jbclements

Description

@jbclements

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions