File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,10 @@ fn main() {
182
182
println ! ( "cargo:rustc-link-lib=framework=Security" ) ;
183
183
println ! ( "cargo:rustc-link-lib=framework=CoreFoundation" ) ;
184
184
}
185
+
186
+ rerun_if ( Path :: new ( "libgit2/include" ) ) ;
187
+ rerun_if ( Path :: new ( "libgit2/src" ) ) ;
188
+ rerun_if ( Path :: new ( "libgit2/deps" ) ) ;
185
189
}
186
190
187
191
fn cp_r ( from : impl AsRef < Path > , to : impl AsRef < Path > ) {
@@ -214,3 +218,13 @@ fn add_c_files(build: &mut cc::Build, path: impl AsRef<Path>) {
214
218
}
215
219
}
216
220
}
221
+
222
+ fn rerun_if ( path : & Path ) {
223
+ if path. is_dir ( ) {
224
+ for entry in fs:: read_dir ( path) . expect ( "read_dir" ) {
225
+ rerun_if ( & entry. expect ( "entry" ) . path ( ) ) ;
226
+ }
227
+ } else {
228
+ println ! ( "cargo:rerun-if-changed={}" , path. display( ) ) ;
229
+ }
230
+ }
You can’t perform that action at this time.
0 commit comments