cmake-conan
cmake-conan copied to clipboard
Do I need to use find_package(Protobuf REQUIRED) when using cmake.conan
Building from the blog post: https://blog.conan.io/2019/03/06/Serializing-your-data-with-Protobuf.html
A CmakeLists.txt file is included. cmakelists.txt
So to activate the function: protobuf_generate_cpp
I need to do a find_package(Protobuf REQUIRED) ...... is this the intent? (If so I can understand it, as Qt has similar issues i.e. find_package to activate auto_moc.)
The reason I ask is that for the most part declaring a lib in the conan_cmake_run call seems to be equivalent to having done a find_package.
i.e. I now use the CONAN_PKG:: syntax
target_link_libraries(${PROJECT_NAME} CONAN_PKG::protobuf)