File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -477,13 +477,16 @@ function(cpm_add_patches)
477
477
find_program (PATCH_EXECUTABLE patch)
478
478
if (WIN32 AND NOT PATCH_EXECUTABLE)
479
479
# The Windows git executable is distributed with patch.exe. Find the path to the executable, if
480
- # it exists, then search `../../usr/bin` for patch.exe.
480
+ # it exists, then search `../usr/bin` and `../ ../usr/bin` for patch.exe.
481
481
find_package (Git QUIET )
482
482
if (GIT_EXECUTABLE)
483
483
get_filename_component (extra_search_path ${GIT_EXECUTABLE} DIRECTORY )
484
- get_filename_component (extra_search_path ${extra_search_path} DIRECTORY )
485
- get_filename_component (extra_search_path ${extra_search_path} DIRECTORY )
486
- find_program (PATCH_EXECUTABLE patch HINTS "${extra_search_path} /usr/bin" )
484
+ get_filename_component (extra_search_path_1up ${extra_search_path} DIRECTORY )
485
+ get_filename_component (extra_search_path_2up ${extra_search_path_1up} DIRECTORY )
486
+ find_program (
487
+ PATCH_EXECUTABLE patch HINTS "${extra_search_path_1up} /usr/bin"
488
+ "${extra_search_path_2up} /usr/bin"
489
+ )
487
490
endif ()
488
491
endif ()
489
492
if (NOT PATCH_EXECUTABLE)
You can’t perform that action at this time.
0 commit comments