vcpkg deps (#8764)
* Revert "Revert vcpkg ffmpeg (#8751)"
This reverts commit 5c16a8302e.
* vcpkg: Reland ffmpeg and try to fix sciter build
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
* vcpkg: Detect AVX2 by requiring __m256i
(ubuntu18.04 sciter)
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
* Install nasm from debian buster and python3.7
... from ubuntu universe
[Skip CI]
* vcpkg: Add libyuv port with fix for windows
From
https://github.com/dchapyshev/vcpkg4aspia/commit/abc59feabf5b3a70662631293eb67c941be4bb8a
Found by @deep-soft
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
* Bump vcpkg baseline to 2024.07.12
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
* Fix F-Droid version action
I thought the latest release will be updated by the time hook starts
but it is not the case. Get tag from GITHUB_REF instead if GITHUB_REF_TYPE
is "tag".
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
---------
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
This commit is contained in:
@@ -188,6 +188,52 @@ fn gen_vcpkg_package(package: &str, ffi_header: &str, generated: &str, regex: &s
|
||||
generate_bindings(&ffi_header, &includes, &ffi_rs, &exact_file, regex);
|
||||
}
|
||||
|
||||
// If you have problems installing ffmpeg, you can download $VCPKG_ROOT/installed from ci
|
||||
// Linux require link in hwcodec
|
||||
/*
|
||||
fn ffmpeg() {
|
||||
// ffmpeg
|
||||
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
|
||||
let target_arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
||||
let static_libs = vec!["avcodec", "avutil", "avformat"];
|
||||
static_libs.iter().for_each(|lib| {
|
||||
find_package(lib);
|
||||
});
|
||||
if target_os == "windows" {
|
||||
println!("cargo:rustc-link-lib=static=libmfx");
|
||||
}
|
||||
|
||||
// os
|
||||
let dyn_libs: Vec<&str> = if target_os == "windows" {
|
||||
["User32", "bcrypt", "ole32", "advapi32"].to_vec()
|
||||
} else if target_os == "linux" {
|
||||
let mut v = ["va", "va-drm", "va-x11", "vdpau", "X11", "stdc++"].to_vec();
|
||||
if target_arch == "x86_64" {
|
||||
v.push("z");
|
||||
}
|
||||
v
|
||||
} else if target_os == "macos" || target_os == "ios" {
|
||||
["c++", "m"].to_vec()
|
||||
} else if target_os == "android" {
|
||||
["z", "m", "android", "atomic"].to_vec()
|
||||
} else {
|
||||
panic!("unsupported os");
|
||||
};
|
||||
dyn_libs
|
||||
.iter()
|
||||
.map(|lib| println!("cargo:rustc-link-lib={}", lib))
|
||||
.count();
|
||||
|
||||
if target_os == "macos" || target_os == "ios" {
|
||||
println!("cargo:rustc-link-lib=framework=CoreFoundation");
|
||||
println!("cargo:rustc-link-lib=framework=CoreVideo");
|
||||
println!("cargo:rustc-link-lib=framework=CoreMedia");
|
||||
println!("cargo:rustc-link-lib=framework=VideoToolbox");
|
||||
println!("cargo:rustc-link-lib=framework=AVFoundation");
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
fn main() {
|
||||
// note: all link symbol names in x86 (32-bit) are prefixed wth "_".
|
||||
// run "rustup show" to show current default toolchain, if it is stable-x86-pc-windows-msvc,
|
||||
@@ -204,6 +250,7 @@ fn main() {
|
||||
gen_vcpkg_package("libvpx", "vpx_ffi.h", "vpx_ffi.rs", "^[vV].*");
|
||||
gen_vcpkg_package("aom", "aom_ffi.h", "aom_ffi.rs", "^(aom|AOM|OBU|AV1).*");
|
||||
gen_vcpkg_package("libyuv", "yuv_ffi.h", "yuv_ffi.rs", ".*");
|
||||
// ffmpeg();
|
||||
|
||||
// there is problem with cfg(target_os) in build.rs, so use our workaround
|
||||
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
|
||||
|
||||
Reference in New Issue
Block a user