File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ fn main() {
65
65
#[ cfg( feature = "hardsubx_ocr" ) ]
66
66
{
67
67
builder = builder. clang_arg ( "-DENABLE_HARDSUBX" ) ;
68
-
68
+
69
69
// Add FFmpeg include paths for Mac
70
70
if cfg ! ( target_os = "macos" ) {
71
71
// Try common Homebrew paths
@@ -74,7 +74,7 @@ fn main() {
74
74
} else if std:: path:: Path :: new ( "/usr/local/include" ) . exists ( ) {
75
75
builder = builder. clang_arg ( "-I/usr/local/include" ) ;
76
76
}
77
-
77
+
78
78
// Check Homebrew Cellar for FFmpeg
79
79
let cellar_ffmpeg = "/opt/homebrew/Cellar/ffmpeg" ;
80
80
if std:: path:: Path :: new ( cellar_ffmpeg) . exists ( ) {
@@ -84,14 +84,15 @@ fn main() {
84
84
if let Ok ( entry) = entry {
85
85
let include_path = entry. path ( ) . join ( "include" ) ;
86
86
if include_path. exists ( ) {
87
- builder = builder. clang_arg ( format ! ( "-I{}" , include_path. display( ) ) ) ;
87
+ builder =
88
+ builder. clang_arg ( format ! ( "-I{}" , include_path. display( ) ) ) ;
88
89
break ;
89
90
}
90
91
}
91
92
}
92
93
}
93
94
}
94
-
95
+
95
96
// Also check environment variable
96
97
if let Ok ( ffmpeg_include) = env:: var ( "FFMPEG_INCLUDE_DIR" ) {
97
98
builder = builder. clang_arg ( format ! ( "-I{}" , ffmpeg_include) ) ;
You can’t perform that action at this time.
0 commit comments