aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-10-19 08:53:59 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-10-19 08:53:59 -0700
commitf527812e9e7f6436aa11c9f01b7f70e4c4893270 (patch)
tree7eb5ddf8a0cbee52cfdfaaacfcf4f964421c8167 /scripts
parent0b75d75f55e8620f1c3f92b5339eed0dd84c4349 (diff)
downloadvcpkg-f527812e9e7f6436aa11c9f01b7f70e4c4893270.tar.gz
vcpkg-f527812e9e7f6436aa11c9f01b7f70e4c4893270.zip
[grpc] Fix absolute paths in installed cmake files.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_fixup_cmake_targets.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake
index eaf3bb966..40ed0225f 100644
--- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake
+++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake
@@ -83,6 +83,7 @@ function(vcpkg_fixup_cmake_targets)
)
foreach(RELEASE_TARGET ${RELEASE_TARGETS})
file(READ ${RELEASE_TARGET} _contents)
+ string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}")
string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+\\.exe)" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}")
file(WRITE ${RELEASE_TARGET} "${_contents}")
endforeach()
@@ -95,6 +96,7 @@ function(vcpkg_fixup_cmake_targets)
get_filename_component(DEBUG_TARGET_NAME ${DEBUG_TARGET} NAME)
file(READ ${DEBUG_TARGET} _contents)
+ string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}")
string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+\\.exe)" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}")
string(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" _contents "${_contents}")
string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" _contents "${_contents}")