From 3a28e12534133fa44bc540e02f020ffea9cfa108 Mon Sep 17 00:00:00 2001 From: Li Xinwei <1326710505@qq.com> Date: Thu, 6 May 2021 15:55:27 +0800 Subject: [PATCH] CMake: fix build with static Brotli BrotliCommon is a dependency of BrotliDec and BrotliEnc. amends 5d2da76c1ee70ffd1f027365c0f3af74b76fd382 Change-Id: I7741d417e95737f8caacd01962985a27dbb7514c Reviewed-by: Alexandru Croitor (cherry picked from commit d104d510ea6c4f3a24f5d6105930d57c6aee0cb6) Reviewed-by: Qt Cherry-pick Bot --- cmake/FindWrapBrotli.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/FindWrapBrotli.cmake b/cmake/FindWrapBrotli.cmake index 524cb425e4f..bc8e058f996 100644 --- a/cmake/FindWrapBrotli.cmake +++ b/cmake/FindWrapBrotli.cmake @@ -86,5 +86,12 @@ else() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(WrapBrotli REQUIRED_VARS BrotliDec_FOUND BrotliEnc_FOUND BrotliCommon_FOUND) + + if (WrapBrotli_FOUND) + set_property(TARGET WrapBrotli::WrapBrotliDec APPEND PROPERTY + INTERFACE_LINK_LIBRARIES WrapBrotli::WrapBrotliCommon) + set_property(TARGET WrapBrotli::WrapBrotliEnc APPEND PROPERTY + INTERFACE_LINK_LIBRARIES WrapBrotli::WrapBrotliCommon) + endif() endif() endif()