summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-23 15:58:32 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-09-23 15:59:23 (GMT)
commitc9a3ae13563f1e66d90225fff98fbc207195c155 (patch)
treea45b81c530d1bdbd9ee7bc3270287b4ecbf31f14
parent869d6c82a0c4e55948ef183c43480dce1ff8dfa9 (diff)
parentae412168782fec0dd6af92b983b7cfdc315077de (diff)
downloadCMake-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.cmake2
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()