diff options
author | Brad King <brad.king@kitware.com> | 2020-09-23 15:58:32 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-09-23 15:59:23 (GMT) |
commit | c9a3ae13563f1e66d90225fff98fbc207195c155 (patch) | |
tree | a45b81c530d1bdbd9ee7bc3270287b4ecbf31f14 | |
parent | 869d6c82a0c4e55948ef183c43480dce1ff8dfa9 (diff) | |
parent | ae412168782fec0dd6af92b983b7cfdc315077de (diff) | |
download | CMake-c9a3ae13563f1e66d90225fff98fbc207195c155.zip CMake-c9a3ae13563f1e66d90225fff98fbc207195c155.tar.gz CMake-c9a3ae13563f1e66d90225fff98fbc207195c155.tar.bz2 |
Merge topic 'FindProtobuf-threads'
ae41216878 FindProtobuf: Link to threads dependency only when Protobuf is found
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5251
-rw-r--r-- | Modules/FindProtobuf.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index f6d8fe3..4bf54ef 100644 --- a/Modules/FindProtobuf.cmake +++ b/Modules/FindProtobuf.cmake @@ -388,7 +388,7 @@ function(_protobuf_find_libraries name filename) select_library_configurations(${name}) - if(UNIX AND Threads_FOUND) + if(UNIX AND Threads_FOUND AND ${name}_LIBRARY) list(APPEND ${name}_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) endif() |