File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ find_package(gRPC ${VIAMCPPSDK_GRPC_VERSION_MINIMUM} CONFIG)
358358# no version here and check it manually below.
359359find_package (Protobuf CONFIG)
360360
361- if (gRPC_FOUND AND Protobuf_FOUND )
361+ if (gRPC_FOUND)
362362 get_target_property (VIAMCPPSDK_GRPC_CPP_PLUGIN gRPC::grpc_cpp_plugin LOCATION )
363363 set (VIAMCPPSDK_PROTOBUF_VERSION ${Protobuf_VERSION} )
364364
@@ -378,7 +378,7 @@ if (gRPC_FOUND AND Protobuf_FOUND)
378378 set (VIAMCPPSDK_GRPCXX_VERSION ${gRPC_VERSION} )
379379 set (VIAMCPPSDK_GRPCXX_LIBRARIES gRPC::grpc++)
380380 set (VIAMCPPSDK_GRPCXX_REFLECTION_LIBRARIES gRPC::grpc++_reflection)
381- elseif (( NOT gRPC_FOUND) AND ( NOT Protobuf_FOUND) )
381+ else ( )
382382 message (WARNING "Failed to find gRPC with `find_package`; falling back to `pkg_check_modules`" )
383383
384384 include (FindPkgConfig)
@@ -414,8 +414,6 @@ elseif((NOT gRPC_FOUND) AND (NOT Protobuf_FOUND))
414414 set (VIAMCPPSDK_GRPCXX_REFLECTION_LIBRARIES ${VIAMCPPSDK_GRPCXX_LIBRARIES} )
415415 set (VIAMCPPSDK_GRPCXX_REFLECTION_LIB ${VIAMCPPSDK_GRPCXX_ROOT} _reflection)
416416 list (PREPEND VIAMCPPSDK_GRPCXX_REFLECTION_LIBRARIES ${VIAMCPPSDK_GRPCXX_REFLECTION_LIB} )
417- else ()
418- message (FATAL_ERROR "Unexpected combination of find_package and pkg-config protobuf and gRPC" )
419417endif ()
420418
421419# Do this here unconditionally in case find_package didn't set the MAJOR/MINOR variables
You can’t perform that action at this time.
0 commit comments