Fix PC_REQUIRES_PRIV related overlinking in fluidsynth.pc

This commit is contained in:
derselbst 2021-12-20 16:21:08 +01:00
parent d9f95b77d4
commit ce6e270a41

View file

@ -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()