summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorGravatar Derek Mauro <dmauro@google.com>2023-01-22 17:43:41 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2023-01-22 17:44:22 -0800
commit7e8d8018f621e94182876535320718542a4c5f09 (patch)
tree87b684c7247dfcc5340de8166327a95a900677ac /CMake
parent4eef16170014f75f4291ae335a271900f89eaedf (diff)
Fix pkgconfig generation broken by 14abd930c61ef3ad2842f5c6b7ea60693b0d4ff9
In the non-dll case, don't set the LNK_LIB variable in the deps loop. PiperOrigin-RevId: 503854597 Change-Id: Ic57711c1ed95b998e6ca4f27a0a7982ee99595e2
Diffstat (limited to 'CMake')
-rw-r--r--CMake/AbseilHelpers.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake
index e3569e99..48ca4bde 100644
--- a/CMake/AbseilHelpers.cmake
+++ b/CMake/AbseilHelpers.cmake
@@ -157,6 +157,9 @@ function(absl_cc_library)
else()
set(PC_VERSION "head")
endif()
+ if(NOT _build_type STREQUAL "dll")
+ set(LNK_LIB "${LNK_LIB} -labsl_${_NAME}")
+ endif()
foreach(dep ${ABSL_CC_LIB_DEPS})
if(${dep} MATCHES "^absl::(.*)")
# for DLL builds many libs are not created, but add
@@ -179,7 +182,6 @@ function(absl_cc_library)
set(PC_DEPS "${PC_DEPS},")
endif()
set(PC_DEPS "${PC_DEPS} absl_${CMAKE_MATCH_1} = ${PC_VERSION}")
- set(LNK_LIB "${LNK_LIB} -labsl_${_NAME}")
endif()
endif()
endforeach()