mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
build: Fixed pthread detection.
This commit is contained in:
@ -58,11 +58,9 @@ check_include_file(openssl/blowfish.h HAVE_OPENSSL_BLOWFISH_H)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
|
||||
check_include_file(openssl/des.h HAVE_OPENSSL_DES_H)
|
||||
|
||||
include(FindThreads)
|
||||
|
||||
if(CMAKE_HAVE_PTHREAD_H)
|
||||
set(HAVE_PTHREAD_H)
|
||||
endif(CMAKE_HAVE_PTHREAD_H)
|
||||
if (CMAKE_HAVE_PTHREAD_H)
|
||||
set(HAVE_PTHREAD_H 1)
|
||||
endif (CMAKE_HAVE_PTHREAD_H)
|
||||
|
||||
# FUNCTIONS
|
||||
|
||||
@ -111,6 +109,12 @@ if (Z_LIBRARY)
|
||||
set(HAVE_LIBZ 1)
|
||||
endif (Z_LIBRARY)
|
||||
|
||||
if (CMAKE_HAVE_THREADS_LIBRARY)
|
||||
set(HAVE_PTHREAD 1)
|
||||
|
||||
set(LIBSSH_REQUIRED_LIBRARIES ${LIBSSH_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif (CMAKE_HAVE_THREADS_LIBRARY)
|
||||
|
||||
# OPTIONS
|
||||
if (WITH_DEBUG_CRYPTO)
|
||||
set(DEBUG_CRYPTO 1)
|
||||
@ -120,10 +124,6 @@ if (WITH_DEBUG_CALLTRACE)
|
||||
set(DEBUG_CALLTRACE 1)
|
||||
endif (WITH_DEBUG_CALLTRACE)
|
||||
|
||||
if (CMAKE_HAVE_PTHREAD_CREATE)
|
||||
set(HAVE_PTHREAD)
|
||||
endif (CMAKE_HAVE_PTHREAD_CREATE)
|
||||
|
||||
# ENDIAN
|
||||
if (NOT WIN32)
|
||||
test_big_endian(WORDS_BIGENDIAN)
|
||||
|
Reference in New Issue
Block a user