From b5984fa8d765c251a8ad2a0717c50be2710fa4b4 Mon Sep 17 00:00:00 2001
From: Alex Merry <alex.merry@kde.org>
Date: Mon, 15 May 2017 21:04:16 +0100
Subject: [PATCH] Revert "cmake: fix #8729"

This reverts commit c019e057c20db0b9c9a2f76fb0b9cd6f44addf92.
---
 CMakeLists.txt                    | 7 +++++++
 templates/CMakeLists.txt.template | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a65ce567a6..c4e0e0162d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14326,6 +14326,13 @@ endif (gRPC_BUILD_TESTS)
 
 
 
+if (gRPC_INSTALL)
+  install(EXPORT gRPCTargets
+    DESTINATION ${CMAKE_INSTALL_CMAKEDIR}
+    NAMESPACE gRPC::
+  )
+endif()
+
 foreach(_config gRPCConfig gRPCConfigVersion)
   configure_file(tools/cmake/${_config}.cmake.in
     ${_config}.cmake @ONLY)
diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
index 3e03afdf57..acf39305fa 100644
--- a/templates/CMakeLists.txt.template
+++ b/templates/CMakeLists.txt.template
@@ -618,6 +618,13 @@
   endif()
   </%def>
 
+  if (gRPC_INSTALL)
+    install(EXPORT gRPCTargets
+      DESTINATION <%text>${CMAKE_INSTALL_CMAKEDIR}</%text>
+      NAMESPACE gRPC::
+    )
+  endif()
+
   foreach(_config gRPCConfig gRPCConfigVersion)
     configure_file(tools/cmake/<%text>${_config}</%text>.cmake.in
       <%text>${_config}</%text>.cmake @ONLY)
-- 
GitLab