aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorJon Simons <jon@jonsimons.org>2018-06-08 16:18:06 -0700
committerAndreas Schneider <asn@cryptomilk.org>2018-06-28 09:06:30 +0200
commitc089b700c677de107bebc44c5f5daf30d44a84ba (patch)
tree05d5149958bf63012b8f4a144efb37017a8bbeca /src/CMakeLists.txt
parentc8d6445d44f239b6dc2c9261dc796bf06c800ec1 (diff)
downloadlibssh-c089b700c677de107bebc44c5f5daf30d44a84ba.tar.gz
libssh-c089b700c677de107bebc44c5f5daf30d44a84ba.tar.xz
libssh-c089b700c677de107bebc44c5f5daf30d44a84ba.zip
chacha: fix build for mbedTLS
Fix the build for mbedTLS: * set HAVE_CHACHA for non-mbedTLS builds * only compile chachapoly.c when HAVE_CHACHA * use empty CHACHA20 in src/kex.c unless HAVE_CHACHA Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 90e44253..4edc59f4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -122,7 +122,6 @@ set(libssh_SRCS
bignum.c
buffer.c
callbacks.c
- chachapoly.c
channels.c
client.c
config.c
@@ -167,6 +166,13 @@ set(libssh_SRCS
external/sc25519.c
)
+if (NOT WITH_MBEDTLS)
+ set(libssh_SRCS
+ ${libssh_SRCS}
+ chachapoly.c
+ )
+endif (NOT WITH_MBEDTLS)
+
if (WITH_GCRYPT)
set(libssh_SRCS
${libssh_SRCS}