diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-03-11 23:04:52 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-03-11 23:42:53 -0700 |
| commit | 6d748257418551dbf24ad0cec9b7e5591ccc3e4d (patch) | |
| tree | 46bc72550ce47696739ec3ef3888e954deb9237e /scripts/cmake/vcpkg_fixup_cmake_targets.cmake | |
| parent | 4338ae25a1ac1f81499d12f0c5e4acef5fa1e426 (diff) | |
| download | vcpkg-6d748257418551dbf24ad0cec9b7e5591ccc3e4d.tar.gz vcpkg-6d748257418551dbf24ad0cec9b7e5591ccc3e4d.zip | |
[vcpkg-fixup-cmake-targets] Remove stray absolute references inside top-level cmake files.
Diffstat (limited to 'scripts/cmake/vcpkg_fixup_cmake_targets.cmake')
| -rw-r--r-- | scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 4bd4d135f..7f1f827c2 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -158,4 +158,13 @@ function(vcpkg_fixup_cmake_targets) if(NOT REMAINING_FILES) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) endif() + + # Patch out any remaining absolute references + file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}" CMAKE_CURRENT_PACKAGES_DIR) + file(GLOB CMAKE_FILES ${RELEASE_SHARE}/*.cmake) + foreach(CMAKE_FILE IN LISTS CMAKE_FILES) + file(READ ${CMAKE_FILE} _contents) + string(REPLACE "${CMAKE_CURRENT_PACKAGES_DIR}" "\${CMAKE_CURRENT_LIST_DIR}/../.." _contents "${_contents}") + file(WRITE ${CMAKE_FILE} "${_contents}") + endforeach() endfunction() |
