cmake: Fix building with threading support on MinGW

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
(cherry picked from commit a9a7c2dc29)
This commit is contained in:
Andreas Schneider
2020-01-16 16:22:27 +01:00
parent 4c83d19c48
commit 1a18d9cce2

View File

@@ -85,6 +85,13 @@ if (WITH_NACL AND NACL_FOUND)
)
endif (WITH_NACL AND NACL_FOUND)
if (MINGW AND Threads_FOUND)
set(LIBSSH_LINK_LIBRARIES
${LIBSSH_LINK_LIBRARIES}
Threads::Threads
)
endif()
if (BUILD_STATIC_LIB)
set(LIBSSH_STATIC_LIBRARY
ssh_static