From 7fe89742db94a194947cbd558529140f85c05793 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 24 Apr 2017 18:58:17 -0700 Subject: [icu] Avoid renaming link.exe inside msys -- insert into middle of path instead. --- ports/icu/portfile.cmake | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake index cdd00a0e2..249a6dbc5 100644 --- a/ports/icu/portfile.cmake +++ b/ports/icu/portfile.cmake @@ -16,11 +16,12 @@ vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} # Acquire tools vcpkg_acquire_msys(MSYS_ROOT) -set(ENV{PATH} "${MSYS_ROOT}/usr/bin;$ENV{PATH}") # no idea why, but when PATH is appended to instead of prepended, the build freezes + +# Insert msys into the path between the compiler toolset and windows system32. This prevents masking of "link.exe" but DOES mask "find.exe". +string(REPLACE ";$ENV{SystemRoot}\\system32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") +string(REPLACE ";$ENV{SystemRoot}\\System32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\System32;" NEWPATH "${NEWPATH}") +set(ENV{PATH} "${NEWPATH}") set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) -if(EXISTS ${MSYS_ROOT}/usr/bin/link.exe) - file(RENAME ${MSYS_ROOT}/usr/bin/link.exe ${MSYS_ROOT}/usr/bin/link.exe-renamed) -endif() vcpkg_execute_required_process( COMMAND ${BASH} --noprofile --norc -c "pacman -Sy --noconfirm --needed make" @@ -92,10 +93,6 @@ vcpkg_execute_required_process( LOGNAME "build-${TARGET_TRIPLET}-dbg") message(STATUS "Package ${TARGET_TRIPLET}-dbg done") -if(EXISTS ${MSYS_ROOT}/usr/bin/link.exe-renamed) - file(RENAME ${MSYS_ROOT}/usr/bin/link.exe-renamed ${MSYS_ROOT}/usr/bin/link.exe) -endif() - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin -- cgit v1.2.3