fix pkg-config metadata for shared abseil on windows (#15888)

Closes #15883, tested in https://github.com/conda-forge/libprotobuf-feedstock/pull/209

Closes #15888

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/15888 from h-vetinari:absl_pkgconfig 9062aa945b
PiperOrigin-RevId: 609206067
pull/15919/head
h-vetinari 1 year ago committed by Copybara-Service
parent b785fcb583
commit fe6edca15b
  1. 5
      cmake/install.cmake

@ -1,7 +1,10 @@
include(GNUInstallDirs)
foreach(_target IN LISTS protobuf_ABSL_USED_TARGETS)
string(REPLACE :: _ _modified_target ${_target})
# shared abseil on windows breaks the absl::foo -> absl_foo replacement logic -
# preempt this by a more specific replace (harmless if it doesn't apply); see GH-15883
string(REPLACE "absl::abseil_dll" "abseil_dll" _modified_target ${_target})
string(REPLACE :: _ _modified_target ${_modified_target})
list(APPEND _pc_targets ${_modified_target})
endforeach()
list(APPEND _pc_targets "utf8_range")

Loading…
Cancel
Save