From c1d9d431fd129c06928271ce93ff0645a84f796f Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Thu, 23 Jul 2020 13:44:21 +0200 Subject: [PATCH] Add ZLIB linking workaround for broken Taglib pkgconfig versions (#678) Signed-off-by: Andreas Sturmlechner --- src/libtomahawk/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt index 099d7074b..945f138ae 100644 --- a/src/libtomahawk/CMakeLists.txt +++ b/src/libtomahawk/CMakeLists.txt @@ -534,6 +534,12 @@ TARGET_LINK_LIBRARIES(${TOMAHAWK_LIBRARY} PRIVATE # TagLib target_link_libraries(${TOMAHAWK_LIBRARY} LINK_PUBLIC Taglib::Taglib) +# Necessary workaround until we can depend on >1.11.1 +if (NOT Taglib_VERSION VERSION_GREATER 1.11.1) + if(ZLIB_FOUND) + target_link_libraries(${TOMAHAWK_LIBRARY} PUBLIC -lz) + endif() +endif() INSTALL( TARGETS ${TOMAHAWK_LIBRARY} EXPORT TomahawkLibraryDepends