Add /etc/fstab in order to remove /cygdrive/ prefix (#17138)

* De-duplicate MSYS2 PATH_TO_ROOT construction

* Create MSYS2 /etc/fstab
This commit is contained in:
Kai Pastor 2021-04-30 20:24:19 +02:00 коммит произвёл GitHub
Родитель 71b30b0874
Коммит 37548049a8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -531,6 +531,12 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
endforeach()
file(RENAME ${PATH_TO_ROOT}.tmp ${PATH_TO_ROOT})
endif()
message(STATUS "Using msys root at ${DOWNLOADS}/tools/msys2/${TOTAL_HASH}")
# Due to skipping the regular MSYS2 installer,
# some config files need to be established explicitly.
if(NOT EXISTS "${PATH_TO_ROOT}/etc/fstab")
# This fstab entry removes the cygdrive prefix from paths.
file(WRITE "${PATH_TO_ROOT}/etc/fstab" "none / cygdrive binary,posix=0,noacl,user 0 0")
endif()
message(STATUS "Using msys root at ${PATH_TO_ROOT}")
set(${PATH_TO_ROOT_OUT} ${PATH_TO_ROOT} PARENT_SCOPE)
endfunction()

Просмотреть файл

@ -97,8 +97,7 @@ function(vcpkg_build_make)
set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} -j 1 --trace -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET})
string(REPLACE " " "\\\ " _VCPKG_PACKAGE_PREFIX ${CURRENT_PACKAGES_DIR})
# Don't know why '/cygdrive' is suddenly a requirement here. (at least for x264)
string(REGEX REPLACE "([a-zA-Z]):/" "/cygdrive/\\1/" _VCPKG_PACKAGE_PREFIX "${_VCPKG_PACKAGE_PREFIX}")
string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PACKAGE_PREFIX "${_VCPKG_PACKAGE_PREFIX}")
set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} --trace -f ${_bc_MAKEFILE} ${_bc_INSTALL_TARGET} DESTDIR=${_VCPKG_PACKAGE_PREFIX})
#TODO: optimize for install-data (release) and install-exec (release/debug)
else()