From 9d1d0529d3f46d538b85e7a8ad787e3a27a14096 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 25 Aug 2017 14:26:47 +0200 Subject: move cmake config files to /cmake --- CMakeLists.txt | 2 +- cmake/gRPCConfig.cmake.in | 8 ++++++++ cmake/gRPCConfigVersion.cmake.in | 11 +++++++++++ templates/CMakeLists.txt.template | 2 +- tools/cmake/gRPCConfig.cmake.in | 8 -------- tools/cmake/gRPCConfigVersion.cmake.in | 11 ----------- 6 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 cmake/gRPCConfig.cmake.in create mode 100644 cmake/gRPCConfigVersion.cmake.in delete mode 100644 tools/cmake/gRPCConfig.cmake.in delete mode 100644 tools/cmake/gRPCConfigVersion.cmake.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cf3a1f732..5131bf39b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14523,7 +14523,7 @@ if (gRPC_INSTALL) endif() foreach(_config gRPCConfig gRPCConfigVersion) - configure_file(tools/cmake/${_config}.cmake.in + configure_file(cmake/${_config}.cmake.in ${_config}.cmake @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_config}.cmake DESTINATION ${gRPC_INSTALL_CMAKEDIR} diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in new file mode 100644 index 0000000000..1a0fa6a462 --- /dev/null +++ b/cmake/gRPCConfig.cmake.in @@ -0,0 +1,8 @@ +# Depend packages +@_gRPC_FIND_ZLIB@ +@_gRPC_FIND_PROTOBUF@ +@_gRPC_FIND_SSL@ +@_gRPC_FIND_CARES@ + +# Targets +include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake) diff --git a/cmake/gRPCConfigVersion.cmake.in b/cmake/gRPCConfigVersion.cmake.in new file mode 100644 index 0000000000..f3c19fd403 --- /dev/null +++ b/cmake/gRPCConfigVersion.cmake.in @@ -0,0 +1,11 @@ +set(PACKAGE_VERSION "@PACKAGE_VERSION@") + +# Check whether the requested PACKAGE_FIND_VERSION is compatible +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template index bbe7d7783c..6adff889fe 100644 --- a/templates/CMakeLists.txt.template +++ b/templates/CMakeLists.txt.template @@ -634,7 +634,7 @@ endif() foreach(_config gRPCConfig gRPCConfigVersion) - configure_file(tools/cmake/<%text>${_config}.cmake.in + configure_file(cmake/<%text>${_config}.cmake.in <%text>${_config}.cmake @ONLY) install(FILES <%text>${CMAKE_CURRENT_BINARY_DIR}/${_config}.cmake DESTINATION <%text>${gRPC_INSTALL_CMAKEDIR} diff --git a/tools/cmake/gRPCConfig.cmake.in b/tools/cmake/gRPCConfig.cmake.in deleted file mode 100644 index 1a0fa6a462..0000000000 --- a/tools/cmake/gRPCConfig.cmake.in +++ /dev/null @@ -1,8 +0,0 @@ -# Depend packages -@_gRPC_FIND_ZLIB@ -@_gRPC_FIND_PROTOBUF@ -@_gRPC_FIND_SSL@ -@_gRPC_FIND_CARES@ - -# Targets -include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake) diff --git a/tools/cmake/gRPCConfigVersion.cmake.in b/tools/cmake/gRPCConfigVersion.cmake.in deleted file mode 100644 index f3c19fd403..0000000000 --- a/tools/cmake/gRPCConfigVersion.cmake.in +++ /dev/null @@ -1,11 +0,0 @@ -set(PACKAGE_VERSION "@PACKAGE_VERSION@") - -# Check whether the requested PACKAGE_FIND_VERSION is compatible -if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") - set(PACKAGE_VERSION_COMPATIBLE FALSE) -else() - set(PACKAGE_VERSION_COMPATIBLE TRUE) - if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") - set(PACKAGE_VERSION_EXACT TRUE) - endif() -endif() -- cgit v1.2.3