mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
PkgConfig: account for possible debug postfix in library name (#19444)
PkgConfig: account for possible debug postfix in library name, this fixes #19325
Closes #19444
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/19444 from andresailer:pkgConfigD 8f353cb6ca
PiperOrigin-RevId: 702547617
This commit is contained in:
parent
bedda1d424
commit
3b389187ce
2 changed files with 5 additions and 1 deletions
|
|
@ -20,6 +20,10 @@ if (protobuf_BUILD_SHARED_LIBS)
|
|||
set(_protobuf_PC_CFLAGS -DPROTOBUF_USE_DLLS)
|
||||
endif ()
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
# attach debug postfix only in debug mode
|
||||
set(protobuf_LIBRARY_POSTFIX ${protobuf_DEBUG_POSTFIX})
|
||||
endif()
|
||||
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
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ Name: Protocol Buffers
|
|||
Description: Google's Data Interchange Format
|
||||
Version: @protobuf_VERSION@
|
||||
Requires: @_protobuf_PC_REQUIRES@
|
||||
Libs: -L${libdir} -lprotobuf @CMAKE_THREAD_LIBS_INIT@
|
||||
Libs: -L${libdir} -lprotobuf@protobuf_LIBRARY_POSTFIX@ @CMAKE_THREAD_LIBS_INIT@
|
||||
Cflags: -I${includedir} @_protobuf_PC_CFLAGS@
|
||||
Conflicts: protobuf-lite
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue