diff options
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) |