From ce6e270a415f188eaf3f856c4ad170e9f9c825f4 Mon Sep 17 00:00:00 2001 From: derselbst Date: Mon, 20 Dec 2021 16:21:08 +0100 Subject: [PATCH] Fix PC_REQUIRES_PRIV related overlinking in fluidsynth.pc --- cmake_admin/PkgConfigHelpers.cmake | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cmake_admin/PkgConfigHelpers.cmake b/cmake_admin/PkgConfigHelpers.cmake index 4fa0655e..8ae5b610 100644 --- a/cmake_admin/PkgConfigHelpers.cmake +++ b/cmake_admin/PkgConfigHelpers.cmake @@ -30,13 +30,8 @@ macro ( generate_pkgconfig_spec template outfile target ) set(_cleanlibs) foreach(_lib IN LISTS _libs) if (TARGET ${_lib}) - get_target_property(_tlibs ${_lib} INTERFACE_LINK_LIBRARIES) - foreach(_clib IN LISTS _tlibs) - get_filename_component(_name "${_clib}" NAME) - string(REGEX REPLACE "^lib" "" _clib ${_name}) - string(REGEX REPLACE ".so$" "" _clib ${_clib}) - list(APPEND _cleanlibs ${_clib}) - endforeach() + # All the imported PkgConfig target are explicitly added to PC_REQUIRES_PRIV. + # Do not duplicate them into the Libs.private section, as they will be already part of Requires.private else() list(APPEND _cleanlibs ${_lib}) endif()