From 911e4a892b893df12c028741028826abaffee6f0 Mon Sep 17 00:00:00 2001 From: Eugene Shalygin Date: Mon, 15 Oct 2018 23:10:37 +0200 Subject: [PATCH] cmake: remove $ expressions from INTERFACE_LINK_LIBRARIES When torrent-rasterbar is built a static library, CMake supplies link dependencies inside the LINK_ONLY generator expressions. But pkg-config does not support such operational mode, and thus we can safely replace those expressions with the library names. Closes #3354. --- cmake/Modules/GeneratePkgConfig.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cmake/Modules/GeneratePkgConfig.cmake b/cmake/Modules/GeneratePkgConfig.cmake index e668bc377..2bb76a0ef 100644 --- a/cmake/Modules/GeneratePkgConfig.cmake +++ b/cmake/Modules/GeneratePkgConfig.cmake @@ -49,12 +49,15 @@ function(_get_target_property_merging_configs _var_name _target_name _propert_na endif() endforeach() endif() + # HACK for static libraries cmake populates link dependencies as $. + # pkg-config does not support special handling for static libraries and as such we will remove + # that generator expression + string(REPLACE "$