Find protobuf in CONFIG mode to fixes the absl dependencies.
See also: https://github.com/protocolbuffers/protobuf/issues/12292. Signed-off-by: Tao He <sighingnow@gmail.com>
This commit is contained in:
parent
a8d5980c76
commit
3d8a80b6dd
|
|
@ -106,7 +106,10 @@ if(APPLE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
find_package(Protobuf REQUIRED)
|
find_package(Protobuf CONFIG QUIET)
|
||||||
|
if (NOT Protobuf_FOUND)
|
||||||
|
find_package(Protobuf REQUIRED)
|
||||||
|
endif()
|
||||||
if(Protobuf_PROTOC_EXECUTABLE)
|
if(Protobuf_PROTOC_EXECUTABLE)
|
||||||
if(NOT TARGET protobuf::protoc)
|
if(NOT TARGET protobuf::protoc)
|
||||||
add_executable(protobuf::protoc IMPORTED)
|
add_executable(protobuf::protoc IMPORTED)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue