File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 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)
477477 find_program (PATCH_EXECUTABLE patch)
478478 if (WIN32 AND NOT PATCH_EXECUTABLE)
479479 # 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.
481481 find_package (Git QUIET )
482482 if (GIT_EXECUTABLE)
483483 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+ )
487490 endif ()
488491 endif ()
489492 if (NOT PATCH_EXECUTABLE)
You can’t perform that action at this time.
0 commit comments