Hi  All.
With the gRPC installed, I have libprotobuf.a in the lib64/ folder. But I 
want the libprotobuf.a library to be used from /usr/local/lib. I tried 
changing the libprotobuf path as shown here in the 
/lib64/cmake/protobuf/protobuf-targets-noconfig.cmake file.

# Import target "protobuf::libprotobuf" for configuration "" 
set_property(TARGET protobuf::libprotobuf APPEND PROPERTY 
IMPORTED_CONFIGURATIONS NOCONFIG) 
set_target_properties(protobuf::libprotobuf PROPERTIES 
IMPORTED_LINK_INTERFACE_LANGUAGES_NOCONFIG "CXX" IMPORTED_LOCATION_NOCONFIG 
"${_IMPORT_PREFIX}/usr/local/lib/libprotobuf.a" ) list(APPEND 
_IMPORT_CHECK_TARGETS protobuf::libprotobuf ) list(APPEND 
_IMPORT_CHECK_FILES_FOR_protobuf::libprotobuf 
"${_IMPORT_PREFIX}/usr/local/lib/libprotobuf.a" ) 

But I get the following error while building grpc program :
[root#]: cmake -DCMAKE_PREFIX_PATH=$MY_INSTALL_DIR ../.. 
-- Found Protobuf: /bin/protoc-3.15.2.0 (found version "3.15.2.0") -- Using 
protobuf 3.15.2.0 -- Using gRPC 1.37.1 -- Configuring done 
CMake Error at CMakeLists.txt:153 (add_executable): 
 Target "server" links to target "protobuf::/usr/local/lib/libprotobuf" but 
the target was not found. Perhaps a find_package() call is missing for an 
IMPORTED target, or an ALIAS target is missing? 
 CMake Error at CMakeLists.txt:153 (add_executable):
 Target "client" links to target "protobuf::/usr/local/lib/libprotobuf" but 
the target was not found. Perhaps a find_package() call is missing for an 
IMPORTED target, or an ALIAS target is missing? 

*Can anyone please say what all changes to be done in the CMakelists.txt 
and *.cmake files ?* Thank you!!

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/78a685c4-01e5-4e48-ace4-692d9d38471fn%40googlegroups.com.

Reply via email to