Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an output of the statically linked location for other build scripts #86

Open
dmtrKovalenko opened this issue Sep 1, 2024 · 1 comment

Comments

@dmtrKovalenko
Copy link
Collaborator

dmtrKovalenko commented Sep 1, 2024

If I have my own crate that has a C file with some ffmpeg helpers (e.g. I want to use a macros that is not covered by rust-ffmpeg-sys) I need a completely new separate installation and build of ffmepg to be able to link against it. even if I use "build" feature and ffmpeg-sys already cloned and built ffmpeg for my target platform

It would be amazing if in my crate's build script I'll be able to get the ffmpeg's location by simply looking into specified directory like

    let ffmpeg_include_path = env::var("RUST_FFMPEG_SYS_DIRECTORY").unwrap();
    cc::Build::new()
        .file("ffmpeg_helper.c")
        .header(Path::from(ffmpeg_include_path).join("libavcodec/avcodec.h"))
        .compile("ffmpeg_helper");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@dmtrKovalenko and others