Merge pull request #16343 from jtattermusch/cmake_fix_gflags_as_package

Use correct target name for gflags-config.cmake
pull/16353/head
Jan Tattermusch 6 years ago committed by GitHub
commit 8165c4c0aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmake/gflags.cmake

@ -28,8 +28,8 @@ if("${gRPC_GFLAGS_PROVIDER}" STREQUAL "module")
elseif("${gRPC_GFLAGS_PROVIDER}" STREQUAL "package") elseif("${gRPC_GFLAGS_PROVIDER}" STREQUAL "package")
# Use "CONFIG" as there is no built-in cmake module for gflags. # Use "CONFIG" as there is no built-in cmake module for gflags.
find_package(gflags REQUIRED CONFIG) find_package(gflags REQUIRED CONFIG)
if(TARGET gflags::gflags) if(TARGET gflags)
set(_gRPC_GFLAGS_LIBRARIES gflags::gflags) set(_gRPC_GFLAGS_LIBRARIES gflags)
set(_gRPC_GFLAGS_INCLUDE_DIR ${GFLAGS_INCLUDE_DIR}) set(_gRPC_GFLAGS_INCLUDE_DIR ${GFLAGS_INCLUDE_DIR})
endif() endif()
set(_gRPC_FIND_GFLAGS "if(NOT gflags_FOUND)\n find_package(gflags CONFIG)\nendif()") set(_gRPC_FIND_GFLAGS "if(NOT gflags_FOUND)\n find_package(gflags CONFIG)\nendif()")

Loading…
Cancel
Save