fix: missing -DPROTOBUF_USE_DLLS in pkg-config (#12700) When the protobuf libraries have been compiled as shared libraries the users of the library need to add `-DPROTOBUF_USE_DLLS` to their build line. Otherwise some symbols are missing. Fixes #12699 FWIW, I am not sure this is an ideal fix. It may be better to fix the headers such that no macros change the ABI. Closes #12700 COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12700 from coryan:fix-define-protobuf-use-dlls-in-pkg-config-file 13c792eebd3d070fa25eff68cfca6ae1493e9503 PiperOrigin-RevId: 530116678
diff --git a/cmake/protobuf.pc.cmake b/cmake/protobuf.pc.cmake index 21bbf47..81d87c1 100644 --- a/cmake/protobuf.pc.cmake +++ b/cmake/protobuf.pc.cmake
@@ -8,5 +8,5 @@ Version: @protobuf_VERSION@ Requires: @_protobuf_PC_REQUIRES@ Libs: -L${libdir} -lprotobuf @CMAKE_THREAD_LIBS_INIT@ -Cflags: -I${includedir} +Cflags: -I${includedir} @_protobuf_PC_CFLAGS@ Conflicts: protobuf-lite