diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-14 17:16:28 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-14 17:16:28 +0100 |
commit | d9ed50094da3890b10872a4955dceb2817931f1f (patch) | |
tree | 15f83f511489e46bbb1df5ff2443a784b0a43815 /CMakeLists.txt | |
parent | 4cdee0ee4745a5bb44b9f2c95812cb4f1aea0a31 (diff) | |
download | fastd-d9ed50094da3890b10872a4955dceb2817931f1f.tar fastd-d9ed50094da3890b10872a4955dceb2817931f1f.zip |
Require libuecc; rename cfxp to ecfxp; add some basic infrastructure for crypto implementation
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f536086..da8027e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,13 +3,18 @@ project(FASTD C) set(CMAKE_MODULE_PATH ${FASTD_SOURCE_DIR}) +find_package(UECC) find_package(NaCl) -set(WITH_CFXP ${NACL_FOUND} CACHE BOOL "Include curve25519-fhmqvc-xsalsa20-poly1305 method") +if(UECC_FOUND AND NACL_FOUND) + set(CRYPTO_FOUND TRUE) +endif(UECC_FOUND AND NACL_FOUND) -if(WITH_CFXP AND NOT NACL_FOUND) - MESSAGE(FATAL_ERROR "NaCl: Networking and Cryptography library is required for the curve25519-fhmqvc-xsalsa20-poly1305 method") -endif(WITH_CFXP AND NOT NACL_FOUND) +set(WITH_METHOD_ECFXP ${CRYPTO_FOUND} CACHE BOOL "Include ec25519-fhmqvc-xsalsa20-poly1305 method") + +if(WITH_METHOD_ECFXP AND NOT CRYPTO_FOUND) + MESSAGE(FATAL_ERROR "libuecc and NaCl are required for the ec25519-fhmqvc-xsalsa20-poly1305 method") +endif(WITH_METHOD_ECFXP AND NOT CRYPTO_FOUND) configure_file(${FASTD_SOURCE_DIR}/config.h.in ${FASTD_BINARY_DIR}/config.h) |