[ports.cmake] Fixup capitalization inconsistencies of Windows drive letter. (#8304)

CMAKE_CURRENT_LIST_DIR reflect current directory. Thus It can be lowercase drive letter.
The lowercase drive letter cause #8237 issue.
Fixup drive letter to uppercase by using get_filename_component().
This commit is contained in:
Tetsuya Hayashi 2019-09-25 07:58:10 +09:00 committed by Phil Christensen
parent 863285f627
commit 726b7a6618

View File

@ -18,6 +18,9 @@ else()
]])
endif()
# fixup Windows drive letter to uppercase.
get_filename_component(VCPKG_ROOT_DIR_CANDIDATE ${VCPKG_ROOT_DIR_CANDIDATE} ABSOLUTE)
# Validate VCPKG_ROOT_DIR_CANDIDATE
if (NOT EXISTS "${VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root")
message(FATAL_ERROR "Could not find .vcpkg-root")