mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-05 20:55:46 +03:00
build: Fixed pthread detection.
This commit is contained in:
@@ -62,8 +62,10 @@ else (WITH_GCRYPT)
|
|||||||
endif (NOT OPENSSL_FOUND)
|
endif (NOT OPENSSL_FOUND)
|
||||||
endif(WITH_GCRYPT)
|
endif(WITH_GCRYPT)
|
||||||
|
|
||||||
#find out if we have threading available
|
# Find out if we have threading available
|
||||||
include(FindThreads)
|
set(CMAKE_THREAD_PREFER_PTHREADS ON)
|
||||||
|
find_package(Threads)
|
||||||
|
|
||||||
# config.h checks
|
# config.h checks
|
||||||
include(ConfigureChecks.cmake)
|
include(ConfigureChecks.cmake)
|
||||||
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||||
|
@@ -58,11 +58,9 @@ check_include_file(openssl/blowfish.h HAVE_OPENSSL_BLOWFISH_H)
|
|||||||
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
|
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
|
||||||
check_include_file(openssl/des.h HAVE_OPENSSL_DES_H)
|
check_include_file(openssl/des.h HAVE_OPENSSL_DES_H)
|
||||||
|
|
||||||
include(FindThreads)
|
if (CMAKE_HAVE_PTHREAD_H)
|
||||||
|
set(HAVE_PTHREAD_H 1)
|
||||||
if(CMAKE_HAVE_PTHREAD_H)
|
endif (CMAKE_HAVE_PTHREAD_H)
|
||||||
set(HAVE_PTHREAD_H)
|
|
||||||
endif(CMAKE_HAVE_PTHREAD_H)
|
|
||||||
|
|
||||||
# FUNCTIONS
|
# FUNCTIONS
|
||||||
|
|
||||||
@@ -111,6 +109,12 @@ if (Z_LIBRARY)
|
|||||||
set(HAVE_LIBZ 1)
|
set(HAVE_LIBZ 1)
|
||||||
endif (Z_LIBRARY)
|
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
|
# OPTIONS
|
||||||
if (WITH_DEBUG_CRYPTO)
|
if (WITH_DEBUG_CRYPTO)
|
||||||
set(DEBUG_CRYPTO 1)
|
set(DEBUG_CRYPTO 1)
|
||||||
@@ -120,10 +124,6 @@ if (WITH_DEBUG_CALLTRACE)
|
|||||||
set(DEBUG_CALLTRACE 1)
|
set(DEBUG_CALLTRACE 1)
|
||||||
endif (WITH_DEBUG_CALLTRACE)
|
endif (WITH_DEBUG_CALLTRACE)
|
||||||
|
|
||||||
if (CMAKE_HAVE_PTHREAD_CREATE)
|
|
||||||
set(HAVE_PTHREAD)
|
|
||||||
endif (CMAKE_HAVE_PTHREAD_CREATE)
|
|
||||||
|
|
||||||
# ENDIAN
|
# ENDIAN
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
test_big_endian(WORDS_BIGENDIAN)
|
test_big_endian(WORDS_BIGENDIAN)
|
||||||
|
Reference in New Issue
Block a user