summaryrefslogtreecommitdiffstats
path: root/cmake/FindWrapBrotli.cmake
diff options
context:
space:
mode:
authorLi Xinwei <1326710505@qq.com>2021-05-06 15:55:27 +0800
committerLi Xinwei <1326710505@qq.com>2021-05-07 02:06:44 +0800
commitd104d510ea6c4f3a24f5d6105930d57c6aee0cb6 (patch)
treef00ccd17f3c205658e3457a9dd3f92cc364ca602 /cmake/FindWrapBrotli.cmake
parent76d3cda88469137050f6aab4bbb8578061fe25f2 (diff)
CMake: fix build with static Brotli
BrotliCommon is a dependency of BrotliDec and BrotliEnc. amends 5d2da76c1ee70ffd1f027365c0f3af74b76fd382 Pick-to: 6.1 Change-Id: I7741d417e95737f8caacd01962985a27dbb7514c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/FindWrapBrotli.cmake')
-rw-r--r--cmake/FindWrapBrotli.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/FindWrapBrotli.cmake b/cmake/FindWrapBrotli.cmake
index 524cb425e4..bc8e058f99 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()