Fix declared dependencies for pkg-config

pull/12541/head
Mike Kruskal 2 years ago
parent 2496b98697
commit 2c55945fc5
  1. 9
      cmake/install.cmake
  2. 2
      cmake/protobuf-lite.pc.cmake
  3. 2
      cmake/protobuf.pc.cmake

@ -1,5 +1,14 @@
include(GNUInstallDirs)
foreach(_target IN LISTS protobuf_ABSL_USED_TARGETS)
string(REPLACE :: _ _modified_target ${_target})
list(APPEND _pc_targets ${_modified_target})
endforeach()
list(APPEND _pc_targets "utf8_range")
string(JOIN " " _pc_target_list ${_pc_targets})
set(_protobuf_PC_REQUIRES ${_pc_target_list})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/protobuf.pc.cmake
${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/protobuf-lite.pc.cmake

@ -6,6 +6,8 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: Protocol Buffers
Description: Google's Data Interchange Format
Version: @protobuf_VERSION@
Requires: @_protobuf_PC_REQUIRES@
Requires.private: @_protobuf_PC_REQUIRES_PRIVATE@
Libs: -L${libdir} -lprotobuf-lite @CMAKE_THREAD_LIBS_INIT@
Cflags: -I${includedir}
Conflicts: protobuf

@ -6,6 +6,8 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: Protocol Buffers
Description: Google's Data Interchange Format
Version: @protobuf_VERSION@
Requires: @_protobuf_PC_REQUIRES@
Requires.private: @_protobuf_PC_REQUIRES_PRIVATE@
Libs: -L${libdir} -lprotobuf @CMAKE_THREAD_LIBS_INIT@
Cflags: -I${includedir}
Conflicts: protobuf-lite

Loading…
Cancel
Save