aboutsummaryrefslogtreecommitdiff
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
parent0b75d75f55e8620f1c3f92b5339eed0dd84c4349 (diff)
downloadvcpkg-f527812e9e7f6436aa11c9f01b7f70e4c4893270.tar.gz
vcpkg-f527812e9e7f6436aa11c9f01b7f70e4c4893270.zip
[grpc] Fix absolute paths in installed cmake files.
-rw-r--r--ports/grpc/CONTROL2
-rw-r--r--ports/grpc/portfile.cmake7
-rw-r--r--scripts/cmake/vcpkg_fixup_cmake_targets.cmake2
3 files changed, 8 insertions, 3 deletions
diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL
index 449d58b6c..958ab7723 100644
--- a/ports/grpc/CONTROL
+++ b/ports/grpc/CONTROL
@@ -1,4 +1,4 @@
Source: grpc
-Version: 1.6.0-1
+Version: 1.6.0-2
Build-Depends: zlib, openssl, protobuf, c-ares
Description: An RPC library and framework
diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake
index 49d64b909..791470bc2 100644
--- a/ports/grpc/portfile.cmake
+++ b/ports/grpc/portfile.cmake
@@ -52,14 +52,17 @@ vcpkg_configure_cmake(
-DgRPC_GFLAGS_PROVIDER=none
-DgRPC_BENCHMARK_PROVIDER=none
-DgRPC_INSTALL_CSHARP_EXT=OFF
- -DCMAKE_INSTALL_CMAKEDIR=share/grpc
+ -DgRPC_INSTALL_BINDIR:STRING=bin
+ -DgRPC_INSTALL_LIBDIR:STRING=lib
+ -DgRPC_INSTALL_INCLUDEDIR:STRING=include
+ -DgRPC_INSTALL_CMAKEDIR:STRING=share/grpc
)
# gRPC runs built executables during the build, so they need access to the installed DLLs.
set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin")
vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/grpc")
+vcpkg_fixup_cmake_targets(CONFIG_PATH "share/grpc")
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/grpc RENAME copyright)
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}")