Adds a CMake option to build `libprotoc` separately (#7949)
This exposes the variable `protobuf_BUILD_LIBPROTOC` as CMake option to be able to build libprotoc without building the protoc binary.
diff --git a/cmake/install.cmake b/cmake/install.cmake
index be47c54..4091bc8 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
@@ -6,9 +6,9 @@
${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc @ONLY)
set(_protobuf_libraries libprotobuf-lite libprotobuf)
-if (protobuf_BUILD_PROTOC_BINARIES)
+if (protobuf_BUILD_LIBPROTOC)
list(APPEND _protobuf_libraries libprotoc)
-endif (protobuf_BUILD_PROTOC_BINARIES)
+endif (protobuf_BUILD_LIBPROTOC)
foreach(_library ${_protobuf_libraries})
set_property(TARGET ${_library}