aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2016-11-08 10:31:20 +0100
committerAndreas Schneider <asn@cryptomilk.org>2016-11-08 10:31:20 +0100
commit2f6a8663731668649499142460f648c687c0f5d3 (patch)
tree22db0dd2f3c7c97f5977ce596c008122ec88f7aa /src/CMakeLists.txt
parentf8ef200e7653f1124961659733a9f5d030351d93 (diff)
downloadlibssh-2f6a8663731668649499142460f648c687c0f5d3.tar.gz
libssh-2f6a8663731668649499142460f648c687c0f5d3.tar.xz
libssh-2f6a8663731668649499142460f648c687c0f5d3.zip
cmake: Only build libcrypto and libcrypto-compat when needed
This also fixes the gcrypt build. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3c22dfac..e5a93538 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -125,8 +125,6 @@ set(libssh_SRCS
kex.c
known_hosts.c
legacy.c
- libcrypto.c
- libcrypto-compat.c
log.c
match.c
messages.c
@@ -167,7 +165,11 @@ else (WITH_GCRYPT)
${libssh_SRCS}
pki_crypto.c
ecdh_crypto.c
+ libcrypto.c
)
+ if(OPENSSL_VERSION VERSION_LESS "1.1.0")
+ set(libssh_SRCS ${libssh_SRCS} libcrypto-compat.c)
+ endif()
endif (WITH_GCRYPT)
if (WITH_SFTP)