summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Maltese <michaeljosephmaltese@gmail.com>2017-02-22 06:21:49 (GMT)
committerMichael Maltese <michaeljosephmaltese@gmail.com>2017-02-22 20:27:39 (GMT)
commiteacf7decbf78a184cdad7a6fd533aa4f433ec27f (patch)
treed978c40853be7dda15570bcdc9e11235d63bef81
parent3ccad39000281c40e2a7a5e078adc4f977e462dd (diff)
downloadCMake-eacf7decbf78a184cdad7a6fd533aa4f433ec27f.zip
CMake-eacf7decbf78a184cdad7a6fd533aa4f433ec27f.tar.gz
CMake-eacf7decbf78a184cdad7a6fd533aa4f433ec27f.tar.bz2
GetPrerequisites: also try to resolve just the basename
Fixes #16625.
-rw-r--r--Modules/GetPrerequisites.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index 1b23800..417af7c 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -399,6 +399,11 @@ function(gp_resolve_item context item exepath dirs resolved_item_var)
set(ri "ri-NOTFOUND")
find_file(ri "${item}" ${exepath} ${dirs} NO_DEFAULT_PATH)
find_file(ri "${item}" ${exepath} ${dirs} /usr/lib)
+
+ get_filename_component(basename_item "${item}" NAME)
+ find_file(ri "${basename_item}" PATHS ${exepath} ${dirs} NO_DEFAULT_PATH)
+ find_file(ri "${basename_item}" PATHS /usr/lib)
+
if(ri)
#message(STATUS "info: 'find_file' in exepath/dirs (${ri})")
set(resolved 1)