diff options
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 044ec80..ca32e30 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,2 +1,14 @@ -add_executable(fastd fastd.c handshake.c method_null.c peer.c printf.c queue.c task.c) -target_link_libraries(fastd rt) +set(METHODS method_null.c) +set(FASTD_INCLUDES ${FASTD_BINARY_DIR}) +set(FASTD_LIBS "") + +if(WITH_CFXP) + set(METHODS ${METHODS} method_curve25519_fhmqvc_xsalsa20_poly1305.c) + set(FASTD_INCLUDES ${FASTD_INCLUDES} ${NACL_INCLUDE_DIR}) + set(FASTD_LIBS ${FASTD_LIBS} ${NACL_LIBRARY}) +endif(WITH_CFXP) + +include_directories(${FASTD_INCLUDES}) + +add_executable(fastd fastd.c handshake.c peer.c printf.c queue.c task.c ${METHODS}) +target_link_libraries(fastd rt ${FASTD_LIBS}) |