summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 223c62a..1da7d13 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,5 +1,5 @@
set(METHODS method_null.c)
-set(FASTD_INCLUDES ${FASTD_BINARY_DIR})
+set(FASTD_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} ${FASTD_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
set(FASTD_LIBS "")
if(WITH_METHOD_ECFXP)
@@ -10,5 +10,19 @@ endif(WITH_METHOD_ECFXP)
include_directories(${FASTD_INCLUDES})
-add_executable(fastd fastd.c configure.c handshake.c peer.c printf.c queue.c task.c ${METHODS})
+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)
+
+add_executable(fastd
+ fastd.c
+ config.c
+ handshake.c
+ peer.c
+ printf.c
+ queue.c
+ task.c
+ ${FLEX_fastd_config_lex_OUTPUTS}
+ ${BISON_fastd_config_parse_OUTPUTS}
+ ${METHODS}
+)
target_link_libraries(fastd rt ${FASTD_LIBS})