aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 819d05c2..c37ce4d3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -167,9 +167,23 @@ set(libssh_SRCS
chachapoly.c
)
+if (CMAKE_USE_PTHREADS_INIT)
+ set(libssh_SRCS
+ ${libssh_SRCS}
+ threads/noop.c
+ threads/pthread.c
+ )
+else()
+ set(libssh_SRCS
+ ${libssh_SRCS}
+ threads/noop.c
+ )
+endif()
+
if (WITH_GCRYPT)
set(libssh_SRCS
${libssh_SRCS}
+ threads/libgcrypt.c
libgcrypt.c
gcrypt_missing.c
pki_gcrypt.c
@@ -178,6 +192,7 @@ if (WITH_GCRYPT)
elseif (WITH_MBEDTLS)
set(libssh_SRCS
${libssh_SRCS}
+ threads/mbedtls.c
libmbedcrypto.c
mbedcrypto_missing.c
pki_mbedcrypto.c
@@ -186,6 +201,7 @@ elseif (WITH_MBEDTLS)
else (WITH_GCRYPT)
set(libssh_SRCS
${libssh_SRCS}
+ threads/libcrypto.c
pki_crypto.c
ecdh_crypto.c
libcrypto.c
@@ -319,6 +335,3 @@ if (WITH_STATIC_LIB)
endif (WITH_STATIC_LIB)
message(STATUS "Threads_FOUND=${Threads_FOUND}")
-if (Threads_FOUND)
- add_subdirectory(threads)
-endif (Threads_FOUND)