mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-09-12 18:44:25 +08:00
fix(build): 在运行时解析编解码依赖源码路径
hwcodec 与 libyuv 构建脚本在运行时读取 CARGO_MANIFEST_DIR,避免复用或迁移构建产物后继续引用旧源码目录。
This commit is contained in:
@@ -5,7 +5,8 @@ use std::{
|
||||
};
|
||||
|
||||
fn main() {
|
||||
let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
// Read the current source path when running, since build artifacts may move.
|
||||
let manifest_dir = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap());
|
||||
let cpp_dir = manifest_dir.join("cpp");
|
||||
|
||||
println!("cargo:rerun-if-changed=cpp/yuv_ffi.h");
|
||||
|
||||
Reference in New Issue
Block a user