summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-03-08 14:08:54 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-08 14:08:54 (GMT)
commit37e8ccee54dc76f8efc9717a063414f45f85530f (patch)
treeae63b73f8ecb37618bc4f0e66811ae93d4f53c28 /Modules
parent4aaa8adf545054aa18f01fe719732e70548b2207 (diff)
downloadCMake-37e8ccee54dc76f8efc9717a063414f45f85530f.zip
CMake-37e8ccee54dc76f8efc9717a063414f45f85530f.tar.gz
CMake-37e8ccee54dc76f8efc9717a063414f45f85530f.tar.bz2
GetPrerequisites: Fix gp_resolved_file_type on non-canonical paths
Canonicalize the input paths so we treat them both consistently, in particular when comparing them via string operations. This is needed for calls like fixup_bundle("${CMAKE_INSTALL_PREFIX}/../test" ...) Suggested-by: Benjamin Ballet <bballet@ivsweb.com>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/GetPrerequisites.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index 391e7f8..9ea1281 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -500,6 +500,7 @@ function(gp_resolved_file_type original_file file exepath dirs type_var)
if(NOT IS_ABSOLUTE "${original_file}")
message(STATUS "warning: gp_resolved_file_type expects absolute full path for first arg original_file")
endif()
+ get_filename_component(original_file "${original_file}" ABSOLUTE) # canonicalize path
set(is_embedded 0)
set(is_local 0)
@@ -515,6 +516,7 @@ function(gp_resolved_file_type original_file file exepath dirs type_var)
if(NOT IS_ABSOLUTE "${file}")
gp_resolve_item("${original_file}" "${file}" "${exepath}" "${dirs}" resolved_file "${rpaths}")
endif()
+ get_filename_component(resolved_file "${resolved_file}" ABSOLUTE) # canonicalize path
string(TOLOWER "${original_file}" original_lower)
string(TOLOWER "${resolved_file}" lower)