summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 986568c..a700c4c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,14 +1,10 @@
-set(PROTOCOLS protocol_null.c)
-set(FASTD_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} ${FASTD_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
-set(FASTD_LIBS "")
+set(METHODS method_null.c)
-if(WITH_PROTOCOL_ECFXP)
- list(APPEND PROTOCOLS protocol_ec25519_fhmqvc_xsalsa20_poly1305.c)
- list(APPEND FASTD_INCLUDES ${UECC_INCLUDE_DIR} ${NACL_INCLUDE_DIR})
- list(APPEND FASTD_LIBS ${UECC_LIBRARY} ${NACL_LIBRARY})
-endif(WITH_PROTOCOL_ECFXP)
+if(WITH_METHOD_XSALSA20_POLY1305)
+ list(APPEND METHODS method_xsalsa20_poly1305.c)
+endif(WITH_METHOD_XSALSA20_POLY1305)
-include_directories(${FASTD_INCLUDES})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${FASTD_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${UECC_INCLUDE_DIR} ${NACL_INCLUDE_DIR})
FLEX_TARGET(fastd_config_lex config.l ${CMAKE_CURRENT_BINARY_DIR}/config.ll.c)
BISON_TARGET(fastd_config_parse config.y ${CMAKE_CURRENT_BINARY_DIR}/config.yy.c)
@@ -22,10 +18,11 @@ add_executable(fastd
queue.c
random.c
task.c
+ protocol_ec25519_fhmqvc.c
${FLEX_fastd_config_lex_OUTPUTS}
${BISON_fastd_config_parse_OUTPUTS}
- ${PROTOCOLS}
+ ${METHODS}
)
-target_link_libraries(fastd rt ${FASTD_LIBS})
+target_link_libraries(fastd rt ${UECC_LIBRARY} ${NACL_LIBRARY})
install(TARGETS fastd RUNTIME DESTINATION sbin)