From 7e8d8018f621e94182876535320718542a4c5f09 Mon Sep 17 00:00:00 2001 From: Derek Mauro Date: Sun, 22 Jan 2023 17:43:41 -0800 Subject: 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 --- CMake/AbseilHelpers.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'CMake') 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() -- cgit v1.2.3