mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03:00
build: Use Threads_FOUND to decide whether to build ssh_threads.
Follow-up to4e04ec8, which caused a regression on OS X. Checking the value of CMAKE_THREAD_LIBS_INIT to decide whether any threading library is present on a system turns out to be wrong -- in OS X, for example, usage of pthreads does not depend on any additional linker or compiler flags, so CMAKE_THREAD_LIBS_INIT is empty and our check in src/CMakeLists.txt failed (it used to work before4e04ec8because CMAKE_HAVE_THREADS_LIBRARY is set). Instead, just look for Threads_FOUND, which FindThreads sets just like any other Find module when it has found what it was looking for. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
fa34d11749
commit
398e8d50b5
@@ -288,6 +288,6 @@ if (WITH_STATIC_LIB)
|
||||
)
|
||||
endif (WITH_STATIC_LIB)
|
||||
|
||||
if (CMAKE_THREAD_LIBS_INIT)
|
||||
if (Threads_FOUND)
|
||||
add_subdirectory(threads)
|
||||
endif (CMAKE_THREAD_LIBS_INIT)
|
||||
endif (Threads_FOUND)
|
||||
|
||||
Reference in New Issue
Block a user