Ensure async_grpc is find_packaged() for Cartographer users (#1105)

master
Juraj Oršulić 2018-07-09 13:11:51 +02:00 committed by Alexander Belyaev
parent 8b2c755a13
commit 3bf9ba0a69
2 changed files with 7 additions and 0 deletions

View File

@ -22,6 +22,7 @@ set(CARTOGRAPHER_PATCH_VERSION 0)
set(CARTOGRAPHER_VERSION ${CARTOGRAPHER_MAJOR_VERSION}.${CARTOGRAPHER_MINOR_VERSION}.${CARTOGRAPHER_PATCH_VERSION}) set(CARTOGRAPHER_VERSION ${CARTOGRAPHER_MAJOR_VERSION}.${CARTOGRAPHER_MINOR_VERSION}.${CARTOGRAPHER_PATCH_VERSION})
set(CARTOGRAPHER_SOVERSION ${CARTOGRAPHER_MAJOR_VERSION}.${CARTOGRAPHER_MINOR_VERSION}) set(CARTOGRAPHER_SOVERSION ${CARTOGRAPHER_MAJOR_VERSION}.${CARTOGRAPHER_MINOR_VERSION})
option(BUILD_GRPC "build Cartographer gRPC support" false) option(BUILD_GRPC "build Cartographer gRPC support" false)
set(CARTOGRAPHER_HAS_GRPC ${BUILD_GRPC})
option(BUILD_PROMETHEUS "build Prometheus monitoring support" false) option(BUILD_PROMETHEUS "build Prometheus monitoring support" false)
include("${PROJECT_SOURCE_DIR}/cmake/functions.cmake") include("${PROJECT_SOURCE_DIR}/cmake/functions.cmake")

View File

@ -32,4 +32,10 @@ else ()
find_package(Ceres HINTS ${CERES_DIR_HINTS}) find_package(Ceres HINTS ${CERES_DIR_HINTS})
endif() endif()
set(CARTOGRAPHER_HAS_GRPC @CARTOGRAPHER_HAS_GRPC@)
if(CARTOGRAPHER_HAS_GRPC)
find_package(async_grpc)
endif()
include("${CARTOGRAPHER_CMAKE_DIR}/CartographerTargets.cmake") include("${CARTOGRAPHER_CMAKE_DIR}/CartographerTargets.cmake")